You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(7) |
2
(8) |
|
3
(3) |
4
(5) |
5
(2) |
6
(3) |
7
(4) |
8
(11) |
9
(4) |
|
10
|
11
(8) |
12
(10) |
13
(16) |
14
(14) |
15
(13) |
16
(1) |
|
17
|
18
(8) |
19
(6) |
20
(13) |
21
(15) |
22
(5) |
23
(13) |
|
24
(2) |
25
(4) |
26
(1) |
27
(4) |
28
(8) |
29
(11) |
30
(5) |
|
31
(3) |
|
|
|
|
|
|
|
From: Benjamin R. <ben...@ou...> - 2011-07-13 22:49:11
|
On Wednesday, July 13, 2011, Justin McCann <jn...@gm...> wrote: > 2011/7/13 SULSEUNG-JIN <sul...@ho...>: >> Thanks, Justin >> >> I think I made a confusing example code. Here comes new one: > > Maybe you just need to force a call to draw() and set your x/y limits. > This works for me on matplotlib 1.0.1 > > $ ipython -pylab > # ==== > from matplotlib.collections import LineCollection > f = figure() > plot() > ax = gca() > vec = numpy.random.random((10,3)) > segs = [] > for i in range(0, len(vec)): > x1 = vec[i][0] > #x1 = 3000000 > x2 = vec[i][1] > #x2 = 4000000 > y1 = y2 = vec[i][2] > segs.extend( [[(x1,y1),(x2,y2)]] ) > > line_segments = LineCollection(segs, linewidth=3, alpha=0.3, colors = > 'r', linestyle = 'solid') > ax.add_collection(line_segments) > ax.set_xlim(0,1) > ax.set_ylim(0,1) > show() # hmmmm... nothing yet > draw() # force a draw; now it works > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > Just an observation (I haven't tested anything)... But what is up with the call to plot()? It might be causing issues with the autoscaler. Any line collections created without other plotting functions is going to need the axes limits set. Ben Root |
|
From: SULSEUNG-JIN <sul...@ho...> - 2011-07-13 22:31:35
|
If I set like vec = 100*numpy.random.random((10,3)) it does not shpw lines even with changing the set_xlimit and set_ylimit. I guess there is something related with scaling. Jin --- > Date: Wed, 13 Jul 2011 16:44:01 -0400 > Subject: Re: [Matplotlib-users] Question on LineCollection > From: jn...@gm... > To: sul...@ho... > CC: mat...@li... > > 2011/7/13 SULSEUNG-JIN <sul...@ho...>: > > Thanks, Justin > > > > I think I made a confusing example code. Here comes new one: > > Maybe you just need to force a call to draw() and set your x/y limits. > This works for me on matplotlib 1.0.1 > > $ ipython -pylab > # ==== > from matplotlib.collections import LineCollection > f = figure() > plot() > ax = gca() > vec = numpy.random.random((10,3)) > segs = [] > for i in range(0, len(vec)): > x1 = vec[i][0] > #x1 = 3000000 > x2 = vec[i][1] > #x2 = 4000000 > y1 = y2 = vec[i][2] > segs.extend( [[(x1,y1),(x2,y2)]] ) > > line_segments = LineCollection(segs, linewidth=3, alpha=0.3, colors = > 'r', linestyle = 'solid') > ax.add_collection(line_segments) > ax.set_xlim(0,1) > ax.set_ylim(0,1) > show() # hmmmm... nothing yet > draw() # force a draw; now it works |
|
From: SULSEUNG-JIN <sul...@ho...> - 2011-07-13 21:10:08
|
Justin, your code works flawlessly. Well, I've got the "vec" from pytables like:
vec = [ [x['sStart'],x['sEnd'],x['dIdent'],x['gi'] ] for x in table.where('(gi == currGi) & (sId == currSubId)') ]
With the above "vec", it does not work. Do you have any idea?
Jin.
---
> Date: Wed, 13 Jul 2011 16:44:01 -0400
> Subject: Re: [Matplotlib-users] Question on LineCollection
> From: jn...@gm...
> To: sul...@ho...
> CC: mat...@li...
>
> 2011/7/13 SULSEUNG-JIN <sul...@ho...>:
> > Thanks, Justin
> >
> > I think I made a confusing example code. Here comes new one:
>
> Maybe you just need to force a call to draw() and set your x/y limits.
> This works for me on matplotlib 1.0.1
>
> $ ipython -pylab
> # ====
> from matplotlib.collections import LineCollection
> f = figure()
> plot()
> ax = gca()
> vec = numpy.random.random((10,3))
> segs = []
> for i in range(0, len(vec)):
> x1 = vec[i][0]
> #x1 = 3000000
> x2 = vec[i][1]
> #x2 = 4000000
> y1 = y2 = vec[i][2]
> segs.extend( [[(x1,y1),(x2,y2)]] )
>
> line_segments = LineCollection(segs, linewidth=3, alpha=0.3, colors =
> 'r', linestyle = 'solid')
> ax.add_collection(line_segments)
> ax.set_xlim(0,1)
> ax.set_ylim(0,1)
> show() # hmmmm... nothing yet
> draw() # force a draw; now it works
|
|
From: Justin M. <jn...@gm...> - 2011-07-13 20:44:08
|
2011/7/13 SULSEUNG-JIN <sul...@ho...>:
> Thanks, Justin
>
> I think I made a confusing example code. Here comes new one:
Maybe you just need to force a call to draw() and set your x/y limits.
This works for me on matplotlib 1.0.1
$ ipython -pylab
# ====
from matplotlib.collections import LineCollection
f = figure()
plot()
ax = gca()
vec = numpy.random.random((10,3))
segs = []
for i in range(0, len(vec)):
x1 = vec[i][0]
#x1 = 3000000
x2 = vec[i][1]
#x2 = 4000000
y1 = y2 = vec[i][2]
segs.extend( [[(x1,y1),(x2,y2)]] )
line_segments = LineCollection(segs, linewidth=3, alpha=0.3, colors =
'r', linestyle = 'solid')
ax.add_collection(line_segments)
ax.set_xlim(0,1)
ax.set_ylim(0,1)
show() # hmmmm... nothing yet
draw() # force a draw; now it works
|
|
From: Ravi K. V. <vvn...@gm...> - 2011-07-13 20:14:53
|
Reposting it as the content of my query in my previous post on the website.
Hi all,
>
> I am having trouble redrawing the canvas when embedding the simple
> matplotlib graph into wxpython.
> I tried creating the required GUI using the XRCed.
> My aim is to display two check boxes, one with Sin and one with Cos signal.
> And then a show button.
> By default both the checkboxes are clicked and a Sin signal is displayed.
> If SinCheckbox is clicked, I want a sin signal. If Cos is clicked, I wanted
> a Cos Signal. If both are checked I wanted a Tan signal to be displayed in
> the figure.
> The problem i am facing is, when I am trying to draw on the canvas for the
> figure, I thought the old canvas gets cleared and draw() redraws the figure.
> But this does not seem to be the case. I still see the old figure and new
> plot being drawn on the old plot.
>
> Also I tried placing the tooltips but they doesnt seem to come up.
>
> Please find the code I have used for the same. I tried to modify the code
> in the matplotlib examples for embedding matplotlib in wxpython.
> Also attaching to this email is the xrc code generated using XRCed
>
> MyApp- class creates the required layout.
> PlotPanel class is responsible for creating the figure, embedding the
> matplotlibfigure inside the canvas and redrawing it through method 'repaint'
> i defined in it.
>
> I am getting an object of PlotPanel in the MyApp instance and calling the
> plot function.
>
>
>
> import wxversion
> wxversion.ensureMinimal('2.8')
>
> import sys, time, os, gc
> import matplotlib
> matplotlib.use('WXAgg')
> import matplotlib.cm as cm
> import matplotlib.cbook as cbook
> from matplotlib.backends.backend_wxagg import Toolbar, FigureCanvasWxAgg, \
> NavigationToolbar2WxAgg as NavigationToolbar
> from matplotlib.figure import Figure
> import numpy as npy
> from pylab import get_current_fig_manager as gcfm
> import wx
> import wx.xrc as xrc
> import matplotlib as mpl
> mpl.use('WXAgg')
> mpl.interactive(False)
> ERR_TOL = 1e-5 # floating point slop for peak-detection
> matplotlib.rc('image', origin='lower')
>
> class PlotPanel(wx.Panel):
>
> def __init__(self, parent):
> wx.Panel.__init__(self, parent, -1)
> self.tooltip = wx.ToolTip(tip='tip with a long %s line and a
> newline\n' % (' '*100)) # needs to be added to getover the bug with tooltip.
> self.fig = Figure((5,4), 200)
> self.a = self.fig.add_subplot(111)
> #self.fig = Figure(0)
> self.canvas = FigureCanvasWxAgg(self, -1, self.fig)
> #self.toolbar = Toolbar(self.canvas) #matplotlib toolbar
> self.toolbar = NavigationToolbar(self.canvas)
> self.toolbar.Realize()
> # Now put all into a sizer
> sizer = wx.BoxSizer(wx.VERTICAL)
> # This way of adding to sizer allows resizing
> sizer.Add(self.canvas, 1, wx.LEFT|wx.BOTTOM|wx.GROW)
> # Best to allow the toolbar to resize!
> sizer.Add(self.toolbar, 0, wx.GROW)
> self.SetSizer(sizer)
> self.Fit()
>
> def init_plot_data(self):
>
> self.x=npy.linspace(0, 6 * npy.pi, 500)
> self.y=npy.sin(self.x)
> #self.x, self.y = npy.meshgrid(x, y)
> print 'before the plotting'
> self.myGraph = self.a.plot(self.x,self.y)
> print 'after the plotting'
>
> self.toolbar.update()
> gcfm().canvas.SetToolTip(self.tooltip)
> self.tooltip.Enable(False)
> self.tooltip.SetDelay(0)
> self.fig.canvas.mpl_connect('motion_notify_event',self._onMotion)
>
> def GetToolBar(self):
> # You will need to override GetToolBar if you are using an
> # unmanaged toolbar in your frame
> return self.toolbar
>
> def _onMotion(self,event) :
> tip='X:{0} Y:{1}'.format(event.xdata,event.ydata)
> print tip
> self.tooltip.SetTip(tip)
> self.tooltip.Enable(True)
>
> def repaint(self):
> self.canvas.draw()
>
> class MyApp(wx.App):
>
> def OnInit(self):
> #xrcfile = cbook.get_sample_data('graphing_tool.xrc',
> asfileobj=False)
> xrcfile='U:\graphing_tool\modularised\\version_13_13th
> July\gtool.xrc'
> print 'loading', xrcfile
>
> self.res = xrc.XmlResource(xrcfile)
>
> # main frame and panel ---------
>
> self.frame = self.res.LoadFrame(None,"mainFrame")
> print 'RAVI: Frame is :',self.frame
> self.panel = xrc.XRCCTRL(self.frame,"mainPanel")
>
> # matplotlib panel -------------
>
> # container for matplotlib panel (I like to make a container
> # panel for our panel so I know where it'll go when in XRCed.)
> plot_container = xrc.XRCCTRL(self.frame,"signalplot")
> sizer = wx.BoxSizer(wx.VERTICAL)
>
> # matplotlib panel itself
> self.plotpanel = PlotPanel(plot_container)
> self.plotpanel.init_plot_data()
>
> sizer.Add(self.plotpanel, 1, wx.EXPAND)
> plot_container.SetSizer(sizer)
>
> # onex checkbox
>
> self.sin_checkbox = xrc.XRCCTRL(self.frame,'sin')
>
> # lte checkbox
>
> self.cos_checkbox = xrc.XRCCTRL(self.frame,'cos')
>
> ## display button
> display_button= xrc.XRCCTRL(self.frame,'display')
> wx.EVT_BUTTON(display_button,display_button.GetId(),self.onDisplay)
>
>
> # final setup ------------------
>
> sizer = self.panel.GetSizer()
> self.frame.Show(1)
>
> self.SetTopWindow(self.frame)
>
> return True
>
> def onDisplay(self,event):
>
> if self.sin_checkbox.IsChecked() and not
> self.cos_checkbox.IsChecked():
> print 'showing sin signal'
> self.plotFigure(1)
>
> elif not self.sin_checkbox.IsChecked() and
> self.cos_checkbox.IsChecked():
> print 'showing cos signal'
> self.plotFigure(2)
> elif self.sin_checkbox.IsChecked() and
> self.cos_checkbox.IsChecked() :
> print 'showing Tan signal'
> self.plotFigure(3)
> else:
> msg= 'Not showing either sin or cos signal. Click on either of
> the signals'
>
> def plotFigure(self,option):
> if option == 1:
> self.plotpanel.y=npy.sin(self.plotpanel.x)
> #self.x, self.y = npy.meshgrid(x, y)
> print 'before the plotting sin'
> self.plotpanel.myGraph =
> self.plotpanel.a.plot(self.plotpanel.x,self.plotpanel.y)
> print 'after the plotting'
>
> self.plotpanel.repaint()
> elif option == 2:
> #self.plotpanel.fig.clf(False)
> #self.plotpanel.canvas.Clear()
> self.plotpanel.y=npy.cos(self.plotpanel.x)
> #self.x, self.y = npy.meshgrid(x, y)
> print 'before the plotting cos'
> self.plotpanel.myGraph =
> self.plotpanel.a.plot(self.plotpanel.x,self.plotpanel.y)
> print 'after the plotting'
> self.plotpanel.repaint()
> else:
> #self.plotpanel.fig.clf(False)
> #self.plotpanel.canvas.Clear()
> self.plotpanel.y=npy.tan(self.plotpanel.x)
> #self.x, self.y = npy.meshgrid(x, y)
> print 'before the plotting Tan'
> self.plotpanel.myGraph =
> self.plotpanel.a.plot(self.plotpanel.x,self.plotpanel.y)
> print 'after the plotting'
> self.plotpanel.repaint()
> if __name__ == '__main__':
> app = MyApp(0)
> app.MainLoop()
>
> --
> Thanks,
> Ravikanth
>
--
Regards,
RaviKanth VN Vanapalli
MS - Telecommunications Engineering
The University of Texas at Dallas, Richardson, TX
Ph: (571) 420 0656
Email: vvn...@gm...
|
|
From: SULSEUNG-JIN <sul...@ho...> - 2011-07-13 20:13:58
|
Thanks, Justin
I think I made a confusing example code. Here comes new one:
segs = []
for i in range(0, len(vec)):
x1 = vec[i][0]
#x1 = 3000000
x2 = vec[i][1]
#x2 = 4000000
y1 = y2 = vec[i][2]
segs.extend( [[(x1,y1),(x2,y2)]] )
line_segments = LineCollection(segs, linewidth=3, alpha=0.3, colors =
'r', linestyle = 'solid') ax.add_collection(line_segments)
The above code doesn't show any lines. But if I comment out one or both of commented parts, the lines are shown.
I mean the below cases are all work.
x1 = vec[i][0]
x2 = 4000000
y1 = y2 = vec[i][2]
or
x1 = 3000000
x2 = vec[i][1]
y1 = y2 = vec[i][2]
I think it's wierd. I'm pretty sure that the 2D array has valid values.
Jin
---
> Date: Wed, 13 Jul 2011 15:32:33 -0400
> Subject: Re: [Matplotlib-users] Question on LineCollection
> From: jn...@gm...
> To: sul...@ho...
> CC: mat...@li...
>
> 2011/7/13 SULSEUNG-JIN <sul...@ho...>:
> > Hi,
> >
> > I'm plotting thousands of short lines on a plot. Because "plot" and "Line2D"
> > are quite slow for this case, I'm trying to use lineCollection. Here comes
> > the part of my testing code:
> >
> > ...
> > segs = []
> >
> > # Manual set for testing
> > x2 = np.zeros(2,dtype=int)
> > ys2 = [np.zeros(2,dtype=float)]
> > x2[0] = 1000000
> > x2[1] = 2000000
> > ys2[0][0] = ys2[0][1] = 50
> > segs.extend( [zip(x2,y) for y in ys2] )
> >
> > for i in range(0, len(records)):
> > ...
> > # get xStart, xEnd, and y
> > ...
> >
> > x2[0] = xStart
> > x2[1] = xEnd
> > ys2[0][0] = ys2[0][1] = y
> > segs.extend( [zip(x2,y) for y in ys2] )
> >
> > line_segments = LineCollection(segs, linewidth=4, alpha=0.3, colors =
> > 'r', linestyle = 'solid')
> > ax.add_collection(line_segments)
> > ...
> >
> > The problem I have is only the first segment of the lines in the "segs"
> > which I manually set the values is shown in the plot. If I move the first
> > part in the for loop to test, it works. What am I missing?
> >
> > Thank you in advance.
>
> Are you sure it's the first segment that shows up, and not the last one?
>
> You're reusing the numpy array x2 and the list ys2. You're overwriting
> the values inside them each time through the for loop, but segs just
> contains len(records) references to the exact same arrays in memory
> (x2 and ys2).
>
> The reason it works if you move the first part inside is that it
> creates a new numpy.array x2 and a new python list ys2 each time then,
> which is what you want.
>
> Justin
|
|
From: Jorge G. <jga...@fi...> - 2011-07-13 19:55:34
|
In case it helps, I also tried the simple plot test recommended in the matplotlib FAQ: Here's the traceback it gave me. $HOME=/home/cadsoft CONFIGDIR=/home/cadsoft/.matplotlib matplotlib data path /usr/local/lib/python3.1/dist-packages/matplotlib/mpl-data loaded rc file /usr/local/lib/python3.1/dist-packages/matplotlib/mpl-data/matplotlibrc matplotlib version 1.1.0 verbose.level helpful interactive is False platform is linux2 Using fontManager instance from /home/cadsoft/.matplotlib/fontList.py3k.cache backend agg version v2.2 Thanks for all of your help. On Fri, Jul 8, 2011 at 2:49 PM, Darren Dale <dsd...@gm...> wrote: > On Wed, Jun 29, 2011 at 10:46 AM, Jorge Garcia <jga...@fi...> wrote: > > Hello, > > > > I was trying to test out the Python 3 development version with the first > > plot shown in the pyplot tutorial. Everything seems to work ok until I go > > > > plt.show() > > > > at which point nothing happens, I don't see a plot. Python accepts the > > command and is waiting for a new command but I have no plot. > > Maybe you don't have a python-3 compatible gui library installed, in > which case your backend is defaulting to AGG, which cannot render a > window for you. > > > I've tried changing the backend in the matplotlibrc file to TkAgg, but I > > still get nothing, in fact now when I try to import matplotlib I get a > > traceback error that name -tkagg is not defined, seems like it might be > > something in the module. > > > > Can anyone lend a hand? > > Posting the exact traceback would help us help you. I'll hazard a > guess that you don't have the tk development packages installed, so > the tkagg backend could not be built when you installed matplotlib for > py3, and therefore tkagg cannot be selected as your backend. > > Darren > |
|
From: Justin M. <jn...@gm...> - 2011-07-13 19:32:40
|
2011/7/13 SULSEUNG-JIN <sul...@ho...>:
> Hi,
>
> I'm plotting thousands of short lines on a plot. Because "plot" and "Line2D"
> are quite slow for this case, I'm trying to use lineCollection. Here comes
> the part of my testing code:
>
> ...
> segs = []
>
> # Manual set for testing
> x2 = np.zeros(2,dtype=int)
> ys2 = [np.zeros(2,dtype=float)]
> x2[0] = 1000000
> x2[1] = 2000000
> ys2[0][0] = ys2[0][1] = 50
> segs.extend( [zip(x2,y) for y in ys2] )
>
> for i in range(0, len(records)):
> ...
> # get xStart, xEnd, and y
> ...
>
> x2[0] = xStart
> x2[1] = xEnd
> ys2[0][0] = ys2[0][1] = y
> segs.extend( [zip(x2,y) for y in ys2] )
>
> line_segments = LineCollection(segs, linewidth=4, alpha=0.3, colors =
> 'r', linestyle = 'solid')
> ax.add_collection(line_segments)
> ...
>
> The problem I have is only the first segment of the lines in the "segs"
> which I manually set the values is shown in the plot. If I move the first
> part in the for loop to test, it works. What am I missing?
>
> Thank you in advance.
Are you sure it's the first segment that shows up, and not the last one?
You're reusing the numpy array x2 and the list ys2. You're overwriting
the values inside them each time through the for loop, but segs just
contains len(records) references to the exact same arrays in memory
(x2 and ys2).
The reason it works if you move the first part inside is that it
creates a new numpy.array x2 and a new python list ys2 each time then,
which is what you want.
Justin
|
|
From: Jorge G. <jga...@fi...> - 2011-07-13 19:13:09
|
Hi Darren,
I think your correct, the matplotlibrc file says that the backend is set to
Agg.
Here's the traceback:
BUILDING MATPLOTLIB
matplotlib: 1.1.0
python: 3.1.2 (r312:79147, Sep 27 2010, 09:45:41) [GCC
4.4.3]
platform: linux2
REQUIRED DEPENDENCIES
numpy: 1.6.0
freetype2: 9.22.3
OPTIONAL BACKEND DEPENDENCIES
libpng: 1.4.7
Tkinter: no
* Using default library and include directories for
* Tcl and Tk because a Tk window failed to open.
* You may need to define DISPLAY for Tk to work so
* that setup can determine where your libraries are
* located. Tkinter present, but header files are not
* found. You may need to install development
* packages.
Gtk+: no
* Building for Gtk+ requires pygtk; you must be able
* to "import gtk" in your build/install environment
Mac OS X native: no
Qt: no
Qt4: no
Cairo: no
OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: 1.5
pytz: 2011c
OPTIONAL USETEX DEPENDENCIES
dvipng: 1.12
ghostscript: 8.71
latex: 3.1415926
pdftops: 0.12.4
[Edit setup.cfg to suppress the above messages]
============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends',
'matplotlib.backends.qt4_editor', 'matplotlib.projections',
'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests',
'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid',
'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist',
'matplotlib.sphinxext', 'matplotlib.tri', 'matplotlib.delaunay']
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc ->
build/lib.linux-i686-3.1/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf ->
build/lib.linux-i686-3.1/matplotlib/mpl-data
running build_ext
On Fri, Jul 8, 2011 at 2:49 PM, Darren Dale <dsd...@gm...> wrote:
> On Wed, Jun 29, 2011 at 10:46 AM, Jorge Garcia <jga...@fi...> wrote:
> > Hello,
> >
> > I was trying to test out the Python 3 development version with the first
> > plot shown in the pyplot tutorial. Everything seems to work ok until I go
> >
> > plt.show()
> >
> > at which point nothing happens, I don't see a plot. Python accepts the
> > command and is waiting for a new command but I have no plot.
>
> Maybe you don't have a python-3 compatible gui library installed, in
> which case your backend is defaulting to AGG, which cannot render a
> window for you.
>
> > I've tried changing the backend in the matplotlibrc file to TkAgg, but I
> > still get nothing, in fact now when I try to import matplotlib I get a
> > traceback error that name -tkagg is not defined, seems like it might be
> > something in the module.
> >
> > Can anyone lend a hand?
>
> Posting the exact traceback would help us help you. I'll hazard a
> guess that you don't have the tk development packages installed, so
> the tkagg backend could not be built when you installed matplotlib for
> py3, and therefore tkagg cannot be selected as your backend.
>
> Darren
>
|
|
From: Paul I. <piv...@gm...> - 2011-07-13 18:48:58
|
Richard Hattersley, on 2011-07-13 09:58, wrote: > Is there a standard way to add fixed-size, arbitrary-design symbols to axes? > - Their position must be given in data coordinates > - Their size must be given in physical coordinates (inches/points) > > They basically need to behave like plot markers, but with the ability to specifiy arbitrary designs. > e.g. See http://commons.wikimedia.org/wiki/File:Cloud_cover_3.svg for an example symbol. > > Currently I'm defining my symbols using a sequence of Patch objects, and then using PatchCollection (with its offsets and transOffset properties, and its set_transform() method) to do the positioning/scaling. > > Is there a better way? This looks similar enough: http://matplotlib.sourceforge.net/examples/api/scatter_piecharts.html best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 |
|
From: SULSEUNG-JIN <sul...@ho...> - 2011-07-13 17:19:23
|
Hi,
I'm plotting thousands of short lines on a plot. Because "plot" and "Line2D" are quite slow for this case, I'm trying to use lineCollection. Here comes the part of my testing code:
...
segs = []
# Manual set for testing
x2 = np.zeros(2,dtype=int)
ys2 = [np.zeros(2,dtype=float)]
x2[0] = 1000000
x2[1] = 2000000
ys2[0][0] = ys2[0][1] = 50
segs.extend( [zip(x2,y) for y in ys2] )
for i in range(0, len(records)):
...
# get xStart, xEnd, and y
...
x2[0] = xStart
x2[1] = xEnd
ys2[0][0] = ys2[0][1] = y
segs.extend( [zip(x2,y) for y in ys2] )
line_segments = LineCollection(segs, linewidth=4, alpha=0.3, colors = 'r', linestyle = 'solid')
ax.add_collection(line_segments)
...
The problem I have is only the first segment of the lines in the "segs" which I manually set the values is shown in the plot. If I move the first part in the for loop to test, it works. What am I missing?
Thank you in advance.
Jin
---
|
|
From: Paul I. <piv...@gm...> - 2011-07-13 16:27:27
|
JD83, on 2011-07-13 08:59, wrote:
>
> I am writing a script with a matplotlib figure embedded in a Tkinter Frame :
>
> fig=Figure()
> ax=fig.add_subplot(111)
> canvas = FigureCanvasTkAgg(fig, root)
>
> and so on...
>
> Everything goes well but when i try to clear the figure, the xaxis and yaxis
> don't desappear, so that the next axis print over the previous ones.
>
> ax.cla() clears the plot.
> But ax.xaxis.cla() or ax.yaxis.cla() have no effect.
as far as i can see, this is for resetting the formatting and
clearing labels - it does have an effect here:
In [16]: ax.set_ylabel("foo")
Out[16]: <matplotlib.text.Text at 0xb25a44c>
In [17]: ax.yaxis.cla() #label is gone
> And fig.clr() seems to lock the process : nothing deleted, nothing new
> ploted.
Try this:
f.clf(keep_observers=False)
from the docstring: "Set *keep_observers* to True if, for example,
a gui widget is tracking the axes in the figure."
best,
--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
|
|
From: JD83 <jd...@fr...> - 2011-07-13 15:59:59
|
I am writing a script with a matplotlib figure embedded in a Tkinter Frame : fig=Figure() ax=fig.add_subplot(111) canvas = FigureCanvasTkAgg(fig, root) and so on... Everything goes well but when i try to clear the figure, the xaxis and yaxis don't desappear, so that the next axis print over the previous ones. ax.cla() clears the plot. But ax.xaxis.cla() or ax.yaxis.cla() have no effect. And fig.clr() seems to lock the process : nothing deleted, nothing new ploted. Can somebody help ? Thank you. JD -- View this message in context: http://old.nabble.com/Clearing-the-axis-in-a-figure-embedded-in-Tkinter-tp32054762p32054762.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Richard H. <hat...@bt...> - 2011-07-13 08:58:16
|
Is there a standard way to add fixed-size, arbitrary-design symbols to axes? - Their position must be given in data coordinates - Their size must be given in physical coordinates (inches/points) They basically need to behave like plot markers, but with the ability to specifiy arbitrary designs. e.g. See http://commons.wikimedia.org/wiki/File:Cloud_cover_3.svg for an example symbol. Currently I'm defining my symbols using a sequence of Patch objects, and then using PatchCollection (with its offsets and transOffset properties, and its set_transform() method) to do the positioning/scaling. Is there a better way? Any suggestions gratefully received! Thanks |
|
From: C M <cmp...@gm...> - 2011-07-13 01:46:29
|
On Tue, Jul 12, 2011 at 3:15 AM, Maximilian Trescher <fa...@tr...> wrote: > Hi, > >> I want to pick a good (dynamic, for zooming) way to format the y axis. >> There are two issues: >> Does (1) seem like the right approach? And for 2, is there already a >> formatter that is appropriate for this or could be adapted to it? > did you try the AutoDateLocator (from matplotlib.dates)? I hadn't. I am trying now but am stuck on: How can I plot the data given that, from the database, each datapoint is of the form ''0:00:02.994000'? Is there a way to tell matplotlib to read that as a time duration? Thanks, Che |
|
From: Paul I. <piv...@gm...> - 2011-07-12 19:21:54
|
Neacsa Bogdan Valentin, on 2011-07-12 03:00, wrote: > I'm having a problem getting matplotlib to work with either > easy_install or pip install. I've tries all sorts of options > from easy_install matplotlib, pip install matplotlib, > easy_install > http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-0.98.5/matplotlib-0.98.5.3.tar.gz > The error which causes both to fail is: Hi Bogdan, are you specifically trying to install that old version of matplotlib? If not, add the -U flag to easy_install to try to grab a newer version best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 |
|
From: Mathew Y. <mat...@gm...> - 2011-07-12 19:00:51
|
Hi
I have a GTK application with the code
def on_pick(event):
print "on_pick"
thisline = event.artist
xdata, ydata = thisline.get_data()
ind = event.ind
print 'on pick line:', zip(xdata[ind], ydata[ind])
cid = fig.canvas.mpl_connect('pick_event', on_pick)
but the routine never gets called when I click the left mouse button.
Instead, the FigureCanvas "pick" method is called.
What am I doing wrong??
-Mathew
|
|
From: Noah A. <noa...@sy...> - 2011-07-12 16:52:02
|
Thanks Christoph. That fixed it at my end as well. Regards, Noah. -----Original Message----- From: Christoph Gohlke [mailto:cg...@uc...] Sent: July-12-11 3:40 AM To: mat...@li... Subject: Re: [Matplotlib-users] Matplotlib crash on Windows 2008 Server On 7/7/2011 3:06 PM, Noah Aklilu wrote: > Hello, > > I am using matplotlib as part of a data analysis tool, and I am having > problems with a crash on Windows 2008 server when plotting data. The > application use to run fine, though I guess there was a round of > windows updates recently (including some VC++ 2008 runtime updates). > No problems on Windows 7 professional with the same runtime updates. > > I have tracked the problem down to the function call to > update_path_extents in the _path.pyd module from transforms.py (L821 > in 1.0.1). > > Anyone else seeing this? I can reproduce this. For me any matplotlib script crashes on Windows Server 2008 when frozen with py2exe and py2exe's "bundle_files" option is not 3 (the default). Frozen PIL scripts also crash. The executables work When bundle_files=3. Christoph > > The event log shows that it is an uncaught VC++ exception based on > this > message: > > Log Name: Application > > Source: Application Error > > Date: 07/07/2011 3:11:40 PM > > Event ID: 1000 > > Task Category: (100) > > Level: Error > > Keywords: Classic > > User: N/A > > Computer: TS1.synodon.com > > Description: > > Faulting application name: sensview.exe, version: 0.0.0.0, time stamp: > 0x4918019c > > Faulting module name: KERNELBASE.dll, version: 6.1.7601.17514, time > stamp: 0x4ce7bafa > > Exception code: 0xe06d7363 > > Fault offset: 0x0000b727 > > Faulting process id: 0x18d8 > > Faulting application start time: 0x01cc3cea60fe867f > > Faulting application path: C:\Program Files > (x86)\sensview\sensview.exe > > Faulting module path: C:\Windows\syswow64\KERNELBASE.dll > > Report Id: b4b6d9f6-a8dd-11e0-bdde-002590135f53 > > Event Xml: > > <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> > > <System> > > <Provider Name="Application Error" /> > > <EventID Qualifiers="0">1000</EventID> > > <Level>2</Level> > > <Task>100</Task> > > <Keywords>0x80000000000000</Keywords> > > <TimeCreated SystemTime="2011-07-07T21:11:40.000000000Z" /> > > <EventRecordID>10539</EventRecordID> > > <Channel>Application</Channel> > > <Computer>TS1.synodon.com</Computer> > > <Security /> > > </System> > > <EventData> > > <Data>sensview.exe</Data> > > <Data>0.0.0.0</Data> > > <Data>4918019c</Data> > > <Data>KERNELBASE.dll</Data> > > <Data>6.1.7601.17514</Data> > > <Data>4ce7bafa</Data> > > <Data>e06d7363</Data> > > <Data>0000b727</Data> > > <Data>18d8</Data> > > <Data>01cc3cea60fe867f</Data> > > <Data>C:\Program Files (x86)\sensview\sensview.exe</Data> > > <Data>C:\Windows\syswow64\KERNELBASE.dll</Data> > > <Data>b4b6d9f6-a8dd-11e0-bdde-002590135f53</Data> > > </EventData> > > </Event> > > > > ---------------------------------------------------------------------- > -------- All of the data generated in your IT infrastructure is > seriously valuable. > Why? It contains a definitive record of application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Benjamin R. <ben...@ou...> - 2011-07-12 14:46:48
|
On Tue, Jul 12, 2011 at 12:53 AM, Kirill Lapshin (Macquarie Securities) < Kir...@ma...> wrote: > ** > Hello, > > We've encountered a problem plotting a nearly flat surface. Interestingly > exactly flat surface can be plotted just fine, so it seems the bug is > triggered when a range of values on z axis is very narrow. The problem can > be easily reproduced on 32-bit windows and 64-bit linux, the only platforms > I have handy, so most likely it is not platform specific. Both platforms > have Python 2.6 and Matplotlb 1.0.1, and I've also seen the same error on > Windows with Matplotlib 1.0.0. Here is a simplified repro: > > ------ > from matplotlib import pyplot > from mpl_toolkits.mplot3d import axes3d > import numpy > > n = 3 > m = 4 > x = range(n) > y = range(m) > z = [ 0.2999999999999 for i in range(n*m) ] > z[1] = 0.3 # comment this line to make it pass > > figure = pyplot.figure( 0 ) > ax = axes3d.Axes3D( figure ) > x = numpy.array( [ [ t ] * m for t in x ] ) > y = numpy.array( [ y ] * n ) > z = numpy.array( z ) > z = z.reshape( [ n, m ] ) > wire = ax.plot_wireframe( x, y, z ) > figure.show() > pyplot.draw() > ----- > > Here is a traceback: > > ---- > Traceback (most recent call last): > File "C:\plotbug.py", line 21, in <module> > pyplot.draw() > File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 358, in > draw > get_current_fig_manager().canvas.draw() > File > "C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py", line > 248, in draw > FigureCanvasAgg.draw(self) > File "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", > line 394, in draw > self.figure.draw(self.renderer) > File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 55, in > draw_wrapper > draw(artist, renderer, *args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\figure.py", line 798, in > draw > func(*args) > File "C:\Python26\lib\site-packages\mpl_toolkits\mplot3d\axes3d.py", line > 172, in draw > ax.draw(renderer) > File "C:\Python26\lib\site-packages\mpl_toolkits\mplot3d\axis3d.py", line > 243, in draw > newval = get_flip_min_max(xyz1[0], newindex, mins, maxs) > IndexError: list index out of range > ---- > > If you comment out "z[1] = 0.3" line, and therefore make surface perfectly > flat, then it will plot just fine. > Any help would be greatly appreciated. > > Kind regards, > > Kirill Lapshin > Kirill, Thanks for the report. I am able to confirm that the problem occurs with v1.0.1, however, it appears that it is solved in the current development trunk and will work properly in the upcoming v1.1.0 release. I am not 100% certain which change it was that fixes this, but it is likely due to my work to make mplot3d functions accept empty inputs. This change would have likely allowed mplot3d to skip some operations under certain conditions. Because of the significant work that has gone into mplot3d since the v1.0.0 release, I would recommend all mplot3d users to upgrade to v1.1 when it is released. I hope this helps! Ben Root |
|
From: Neacsa B. V. <nea...@ya...> - 2011-07-12 10:01:03
|
Hello, I'm having a problem getting matplotlib to work with either easy_install or pip install. I've tries all sorts of options from easy_install matplotlib, pip install matplotlib, easy_install http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-0.98.5/matplotlib-0.98.5.3.tar.gz The error which causes both to fail is: lipo: can't figure out the architecture type of: /var/folders/vO/vOCgTRh6FuWMIH2kWdCZgk+++TM/-Tmp-//ccaBo27K.out error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1 I can get matplotlib working if I download from sourceforge and install manually but I will need to distribute my project and since matplotlib will be a dependecy this is not an option. So how can I get matplotlib to install with either easy_install or pip ? Regards, Bogdan |
|
From: Christoph G. <cg...@uc...> - 2011-07-12 09:40:05
|
On 7/7/2011 3:06 PM, Noah Aklilu wrote: > Hello, > > I am using matplotlib as part of a data analysis tool, and I am having > problems with a crash on Windows 2008 server when plotting data. The > application use to run fine, though I guess there was a round of windows > updates recently (including some VC++ 2008 runtime updates). No problems > on Windows 7 professional with the same runtime updates. > > I have tracked the problem down to the function call to > update_path_extents in the _path.pyd module from transforms.py (L821 in > 1.0.1). > > Anyone else seeing this? I can reproduce this. For me any matplotlib script crashes on Windows Server 2008 when frozen with py2exe and py2exe's "bundle_files" option is not 3 (the default). Frozen PIL scripts also crash. The executables work When bundle_files=3. Christoph > > The event log shows that it is an uncaught VC++ exception based on this > message: > > Log Name: Application > > Source: Application Error > > Date: 07/07/2011 3:11:40 PM > > Event ID: 1000 > > Task Category: (100) > > Level: Error > > Keywords: Classic > > User: N/A > > Computer: TS1.synodon.com > > Description: > > Faulting application name: sensview.exe, version: 0.0.0.0, time stamp: > 0x4918019c > > Faulting module name: KERNELBASE.dll, version: 6.1.7601.17514, time > stamp: 0x4ce7bafa > > Exception code: 0xe06d7363 > > Fault offset: 0x0000b727 > > Faulting process id: 0x18d8 > > Faulting application start time: 0x01cc3cea60fe867f > > Faulting application path: C:\Program Files (x86)\sensview\sensview.exe > > Faulting module path: C:\Windows\syswow64\KERNELBASE.dll > > Report Id: b4b6d9f6-a8dd-11e0-bdde-002590135f53 > > Event Xml: > > <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> > > <System> > > <Provider Name="Application Error" /> > > <EventID Qualifiers="0">1000</EventID> > > <Level>2</Level> > > <Task>100</Task> > > <Keywords>0x80000000000000</Keywords> > > <TimeCreated SystemTime="2011-07-07T21:11:40.000000000Z" /> > > <EventRecordID>10539</EventRecordID> > > <Channel>Application</Channel> > > <Computer>TS1.synodon.com</Computer> > > <Security /> > > </System> > > <EventData> > > <Data>sensview.exe</Data> > > <Data>0.0.0.0</Data> > > <Data>4918019c</Data> > > <Data>KERNELBASE.dll</Data> > > <Data>6.1.7601.17514</Data> > > <Data>4ce7bafa</Data> > > <Data>e06d7363</Data> > > <Data>0000b727</Data> > > <Data>18d8</Data> > > <Data>01cc3cea60fe867f</Data> > > <Data>C:\Program Files (x86)\sensview\sensview.exe</Data> > > <Data>C:\Windows\syswow64\KERNELBASE.dll</Data> > > <Data>b4b6d9f6-a8dd-11e0-bdde-002590135f53</Data> > > </EventData> > > </Event> > > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Maximilian T. <fa...@tr...> - 2011-07-12 07:16:11
|
Hi, > I want to pick a good (dynamic, for zooming) way to format the y axis. > There are two issues: > Does (1) seem like the right approach? And for 2, is there already a > formatter that is appropriate for this or could be adapted to it? did you try the AutoDateLocator (from matplotlib.dates)? And if you did so, are there specific problems with this locator? Maximilian |
|
From: Kirill L. \(M. Securities\) <Kir...@ma...> - 2011-07-12 06:19:56
|
Hello,
We've encountered a problem plotting a nearly flat surface.
Interestingly exactly flat surface can be plotted just fine, so it seems
the bug is triggered when a range of values on z axis is very narrow.
The problem can be easily reproduced on 32-bit windows and 64-bit linux,
the only platforms I have handy, so most likely it is not platform
specific. Both platforms have Python 2.6 and Matplotlb 1.0.1, and I've
also seen the same error on Windows with Matplotlib 1.0.0. Here is a
simplified repro:
------
from matplotlib import pyplot
from mpl_toolkits.mplot3d import axes3d
import numpy
n = 3
m = 4
x = range(n)
y = range(m)
z = [ 0.2999999999999 for i in range(n*m) ]
z[1] = 0.3 # comment this line to make it pass
figure = pyplot.figure( 0 )
ax = axes3d.Axes3D( figure )
x = numpy.array( [ [ t ] * m for t in x ] )
y = numpy.array( [ y ] * n )
z = numpy.array( z )
z = z.reshape( [ n, m ] )
wire = ax.plot_wireframe( x, y, z )
figure.show()
pyplot.draw()
-----
Here is a traceback:
----
Traceback (most recent call last):
File "C:\plotbug.py", line 21, in <module>
pyplot.draw()
File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 358,
in draw
get_current_fig_manager().canvas.draw()
File
"C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 248, in draw
FigureCanvasAgg.draw(self)
File
"C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", line
394, in draw
self.figure.draw(self.renderer)
File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 55, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "C:\Python26\lib\site-packages\matplotlib\figure.py", line 798,
in draw
func(*args)
File "C:\Python26\lib\site-packages\mpl_toolkits\mplot3d\axes3d.py",
line 172, in draw
ax.draw(renderer)
File "C:\Python26\lib\site-packages\mpl_toolkits\mplot3d\axis3d.py",
line 243, in draw
newval = get_flip_min_max(xyz1[0], newindex, mins, maxs)
IndexError: list index out of range
----
If you comment out "z[1] = 0.3" line, and therefore make surface
perfectly flat, then it will plot just fine.
Any help would be greatly appreciated.
Kind regards,
Kirill Lapshin
If there is any advice in this email, it is general advice only and has been prepared by Macquarie Group or one of its related entities (“Macquarie”).
Macquarie has made every reasonable effort to ensure the information provided is correct, but Macquarie makes no representation nor any warranty as to whether the information is accurate, complete or up to date. To the extent permitted by law, Macquarie accepts no responsibility for any errors or misstatements, negligent or otherwise. The information provided may be based on assumptions or market conditions and may change without notice.
Macquarie, its associates, officers or employees may also have interests in the financial products referred to in this information by acting in various roles. They may buy or sell the financial products as principal or agent and as such may effect transactions which are not consistent with any recommendations (if any in this information). Macquarie or its associates may also receive fees or brokerage for acting in the above capacities.
The information in this email is confidential. If you are not the intended recipient, you are not authorised to use the information in this email in any way. Macquarie does not guarantee the integrity of any emails or attached files. The view or opinions expressed are the author's own and may not reflect the view or opinions of Macquarie.
Electronic communications carried within the Macquarie system may be monitored.
|
|
From: C M <cmp...@gm...> - 2011-07-12 04:38:24
|
I need to make a dates (on x) vs. durations of time (on y) plots and need to have smart formatting for the y axis. My y data is in the database in the format: '0:00:02.994000', (that is, 2.9 seconds) and I'd like the y axis to be expressed in ticks of, e.g., "2 hrs", or "10 minutes", or "25 seconds", whichever is applicable...see below. The data could range from as little as a few seconds to more than 12 hours. Sometimes there will be outliers that are in a different unit. E.g., there may be a plot in which most durations are 1-3 hrs, but now and then there is a datapoint of 5 minutes, or even 30 seconds. Or it could be another one with mostly datapoints in minutes, but an occasional long or short one in hours or seconds. I want to pick a good (dynamic, for zooming) way to format the y axis. There are two issues: 1) Should I analyze the data to see what units the majority of datapoints are in and then use that as the y axis units before zooming? That is, if most are durations of minutes, then the y axis should be given in minutes. If most are in hours, the y axis should be hours, etc... This way the formatting is appropriate for the majority of the data displayed. 2) If a plot's y units are given in terms of minutes (because of point #1), but a user wants to zoom in on a datapoint that is only a few seconds, I'd like the formatter to change the y scaling to be in terms of seconds. I don't want to have express durations on the y axis as anything like "0.0335" minutes, but rather "2 seconds". Does (1) seem like the right approach? And for 2, is there already a formatter that is appropriate for this or could be adapted to it? Suggestions welcome. Thanks, Che |
|
From: gary r. <gr...@bi...> - 2011-07-12 00:29:13
|
The pre-defined hsv colour map has this property - can you use that? Otherwise, yes, it is possible to define any map you like. Gary R On Fri, Jul 8, 2011 at 12:55 PM, Ben Elliston <bj...@ai...> wrote: > Hi. > > I have a set of data with a range of (say) 0 to 100. Is it possible > to get matplotlib to use the same colour for 0 and 100, so that the > colours "meet" at the ends of the color bar? > > One workaround is to just manipulate the data (eg. using abs (x-50)), > but I would rather not, if possible. > > Thanks, Ben |