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
(16) |
2
(22) |
3
(28) |
4
(17) |
5
(17) |
6
(7) |
|
7
|
8
(15) |
9
(28) |
10
(26) |
11
(28) |
12
(19) |
13
(5) |
|
14
(3) |
15
(21) |
16
(28) |
17
(11) |
18
(18) |
19
(6) |
20
(5) |
|
21
(18) |
22
(11) |
23
(22) |
24
(28) |
25
(17) |
26
(17) |
27
(7) |
|
28
(16) |
29
(24) |
30
(25) |
31
(14) |
|
|
|
|
From: Alexej B. <ale...@gm...> - 2010-03-14 17:04:19
|
Hello,
I can't understand how to refresh FigureCanvasWxAgg instance. Here is
the example:
import wx
import matplotlib
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from matplotlib.figure import Figure
class MainFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, wx.NewId(), "Main")
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.figure = Figure(figsize=(1,2))
self.axe = self.figure.add_subplot(111)
self.figurecanvas = FigureCanvas(self, -1, self.figure)
self.buttonPlot = wx.Button(self, wx.NewId(), "Plot")
self.buttonClear = wx.Button(self, wx.NewId(), "Clear")
self.sizer.Add(self.figurecanvas, proportion=1, border=5,
flag=wx.ALL | wx.EXPAND)
self.sizer.Add(self.buttonPlot, proportion=0, border=2, flag=wx.ALL)
self.sizer.Add(self.buttonClear, proportion=0, border=2, flag=wx.ALL)
self.SetSizer(self.sizer)
self.figurecanvas.Bind(wx.EVT_LEFT_DCLICK, self.on_dclick)
self.buttonPlot.Bind(wx.EVT_BUTTON, self.on_button_plot)
self.buttonClear.Bind(wx.EVT_BUTTON, self.on_button_clear)
self.subframe_opened = False
def on_dclick(self, evt):
self.subframe = SubFrame(self, self.figure)
self.subframe.Show(True)
self.subframe_opened = True
def on_button_plot(self, evt):
self.axe.plot(range(10), color='green')
self.figurecanvas.draw()
def on_button_clear(self, evt):
if self.subframe_opened:
self.subframe.Close()
self.figure.set_canvas(self.figurecanvas)
self.axe.clear()
self.figurecanvas.draw()
class SubFrame(wx.Frame):
def __init__(self, parent, figure):
wx.Frame.__init__(self, parent, wx.NewId(), "Sub")
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.figurecanvas = FigureCanvas(self, -1, figure)
self.sizer.Add(self.figurecanvas, proportion=1, border=5,
flag=wx.ALL | wx.EXPAND)
self.SetSizer(self.sizer)
self.Bind(wx.EVT_CLOSE, self.on_close)
def on_close(self, evt):
self.GetParent().subframe_opened = False
evt.Skip()
class MyApp(wx.App):
def OnInit(self):
frame = MainFrame()
frame.Show(True)
self.SetTopWindow(frame)
return True
app = MyApp(0)
app.MainLoop()
I'm interested in the following sequence of operations:
- run a script
- resize the main frame
- press Plot button
- double click on plot
- press Clear button
Now I get a mess on main frame plot. If I resize the frame it redraws
properly. My question is what should I add to my code to do that
without resizing?
Thanks in advance,
Alex
|
|
From: Friedrich R. <fri...@gm...> - 2010-03-14 11:37:47
|
2010/3/14 David Arnold <dwa...@su...>: > All, > > I am having difficulty with a line on: http://scipy.org/LoktaVolterraTutorial > > Here are the lines: > > values = linspace(0.3, 0.9, 5) > > vcolors = p.cm.autumn_r(linspace(0.3, 1., len(values))) > > First of all, I can find no reference to autumn_r in the Matplotlib documentation. Also, using Aptana (eclipse), PyDev complains about the vcolors line with: The colormap's data is defined in matplotlib._cm.py, there a dictionary defining the names of the colormaps is defined from line no. 5814 on. The colormaps are "imported", i.e. added to the module-local namespace by "patching" locals() in matplolib.cm on line 43, where cmap_d also containes reversed versions of all the data defined by matplotlib._cm, indicated by an trailing "_r" in the name. Because the data isn't imported the usual way, your program (PyDev?) will not find it. > Undefined variable from import: autumn_r Lotka.py /scipy/src/pkg line 44 PyDev Problem > > Secondly, I am used to using colormaps in Matlab, but not so much in Matplotlib. In Matlab, g=grey(256) produces an 256x3 matrix and each row is indexed by the numbers 1 through 256. Thus, if you have an image and pixel has a value 124, then row 124 gives an rgb triple that is used to color the pixel. I think you can reproduce the matlab behaviour by using: >>> result = some_colormap(numpy.linspace(0.0, 1.0, 256), [bytes = True]). The optional bytes = True argument specifies to return integer \in [0, 255] colors. The return ndarray will have shape (256, 4), and an indicing result[i] returns the ndarray array([r, g, b, a]). Note than numpy and Python use zero-based indices, opposed to matlab's one-based indices. > However, in the case of vcolors = p.cm.autumn_r(linspace(0.3, 1., len(values))), I'm really not sure what is going on. The linspace(0.3,1,len(values)) produces len(values) equally spaced numbers from 0.3 to 1. Now, how is autumn_r(array([ 0.3 , 0.475, 0.65 , 0.825, 1. ])) make any sense? The first argument to some_colormap.__call__(X, alpha [= 1.0], bytes [= False]) is the interpolation axis. I embed __call__()'s __doc__ string: """ *X* is either a scalar or an array (of any dimension). If scalar, a tuple of rgba values is returned, otherwise an array with the new shape = oldshape+(4,). If the X-values are integers, then they are used as indices into the array. If they are floating point, then they must be in the interval (0.0, 1.0). Alpha must be a scalar. If bytes is False, the rgba values will be floats on a 0-1 scale; if True, they will be uint8, 0-255. """ I myself just did a short dive into the matplotlib code of cm.py, _cm.py, and colors.py, so this are just my conclusions. Friedrich |
|
From: David A. <dwa...@su...> - 2010-03-14 03:18:08
|
All, I am having difficulty with a line on: http://scipy.org/LoktaVolterraTutorial Here are the lines: values = linspace(0.3, 0.9, 5) vcolors = p.cm.autumn_r(linspace(0.3, 1., len(values))) First of all, I can find no reference to autumn_r in the Matplotlib documentation. Also, using Aptana (eclipse), PyDev complains about the vcolors line with: Undefined variable from import: autumn_r Lotka.py /scipy/src/pkg line 44 PyDev Problem Secondly, I am used to using colormaps in Matlab, but not so much in Matplotlib. In Matlab, g=grey(256) produces an 256x3 matrix and each row is indexed by the numbers 1 through 256. Thus, if you have an image and pixel has a value 124, then row 124 gives an rgb triple that is used to color the pixel. However, in the case of vcolors = p.cm.autumn_r(linspace(0.3, 1., len(values))), I'm really not sure what is going on. The linspace(0.3,1,len(values)) produces len(values) equally spaced numbers from 0.3 to 1. Now, how is autumn_r(array([ 0.3 , 0.475, 0.65 , 0.825, 1. ])) make any sense? Thanks. David. |
|
From: Brian Z. <br...@gm...> - 2010-03-13 23:49:54
|
I've done this successfully with both the Qt4 and WX Agg backends. The part
you care about is the update method.
Here's the snippet I use for Qt. It shouldn't change except for your
imports at the top if you're using Wx. Note, I've trimmed this down a bit,
so hopefully I didn't trim out anything important:
from matplotlib.figure import Figure
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as
FigureCanvas
class PlotWidget(QWidget):
def __init__(self, parent):
QWidget.__init__(self, parent)
self.dpi=72
self.figure = Figure(dpi=self.dpi, linewidth=3)
self.canvas = FigureCanvas(self.figure)
self.canvas.setParent(self)
self.ax = self.figure.add_subplot(111)
(self.__times, self.__temps) = ([], [])
self.background = self.canvas.copy_from_bbox(self.ax.bbox)
self.plotting_line = self.ax.plot([], color='red', lw=2)[0]
def update(self, temp, secs):
try:
self.__times.append(secs)
self.__temps.append(temp)
self.canvas.restore_region(self.background)
self.plotting_line.set_xdata(self.__times)
self.plotting_line.set_ydata(self.__temps)
self.ax.draw_artist(self.plotting_line)
self.canvas.blit(self.ax.bbox)
except IndexError:
pass
self.canvas.draw()
On Fri, Mar 12, 2010 at 12:36 PM, Gökhan Sever <gok...@gm...>wrote:
> Hello,
>
> I read a simple data stream from my computers serial port. I can nicely
> read the data using pyserial library but couldn't get it *nicely* working
> neither with WXAgg nor Qt4Agg using the following code. Although with WX I
> could get updated looks, the figure isn't very responsive in this way. I
> have looked at simple_idle_wx example but for some reason I can't make it
> work to update the canvas whenever the condition satisfied.
>
> What is the trick to make the real-time data plotted on the screen easily
> without blocking the figure itself?
>
> import serial
> import matplotlib.pyplot as plt
> plt.ion()
>
> ser = serial.Serial(0)
>
> conc = []
> while True:
> s = ser.readline()
> if s.startswith('CONC'):
> conc.append(float(s.split()[2]))
> plt.plot(conc)
> plt.show()
> plt.clf()
>
> ser.close()
>
> --
> Gökhan
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Jae-Joon L. <lee...@gm...> - 2010-03-13 20:02:41
|
On Fri, Mar 12, 2010 at 7:45 AM, othererik <oth...@gm...> wrote: > Here's a short example that does the opposite of what I'm looking for. The > goal is to take a the polygon "poly_patch" and "cut" regions out of it. > All I've managed to achieve so far has been to show regions of the > "poly_patch". > With clip_path set, things inside the clip_path is only drawn. So, I think you're misusing clip_path. To draw a rectangle with a hole in it, you need to create a compound path. And, this requires some understanding of how path system works in general. See this, http://matplotlib.sourceforge.net/users/path_tutorial.html and http://old.nabble.com/Compound-paths-to19278422.html#a19296862 Here is modified version of your script that draws a rectangle with a hole. It concatenates two existing paths. But, often it is better to start from scratch (but again you need to understand how path works). And of course, the resulting compound path can be set as a clip_path of other artist. Regards, -JJ import matplotlib from matplotlib import patches import pylab fig=pylab.figure() ax=fig.add_subplot(111) # background line line = ax.plot( [ 1, 2, 3], [ 1, 2, 3 ] ) # mask polygon that should cover/hide the area not intersecting the poly_patch = patches.Polygon(((1,1),(1,3),(3,3), (3,1))) # part I would like to see through hole_patch = patches.Circle((2,2), radius=.5, facecolor='red') from matplotlib.bezier import make_path_regular, concatenate_paths from matplotlib.path import Path from matplotlib.patches import PathPatch poly_path = make_path_regular(poly_patch.get_path()) # close the path closed_polygon_path = Path(list(poly_path.vertices)+[(0,0)], list(poly_path.codes)+[Path.CLOSEPOLY]) # circle with coordinate transformed hole_path = hole_patch.get_path() hole_path_transformed = hole_patch.get_patch_transform().transform_path(hole_path) # make polygon with a hole poly_with_hole_path = concatenate_paths([closed_polygon_path, hole_path_transformed]) poly_with_hole_patch = PathPatch(poly_with_hole_path) ax.add_patch(poly_with_hole_patch) ax.set_xlim(0, 4) ax.set_ylim(0, 4) pylab.show() |
|
From: Eric F. <ef...@ha...> - 2010-03-13 19:30:31
|
David Smith wrote: > This is a bug report. > > I am using matplotlib 0.99.1 on Windows. When using contour with the > keyword > argument locator=ticker.FixedLocator(levels), the plot is always > dropping the first > and last contour level. If there are less than 3 levels, contour.py > throws an > exception. > > My workaround is to duplicate the first and last levels when using the > fixed locator: > e.g. my argument becomes > > locator=FixedLocator( [levels[0]] + levels + [levels[-1]] ) > > I have traced the problem to the last line in contour.py, method > _autolev() which > strips the first and last levels if the contours are not filled: > > return lev[1:-1] > > This line occurs at line 682 in my version of contour.py which came with > the 0.991 installation. > > I realize that I could specify the levels in the argument V and this > does work. However > this code is embedded in GUI-ness which allows the user to choose how > the contours > are selected. Passing the locator seems to be the best option code-wise. I committed a small change to svn trunk (r8190) that I think will handle your use case without fouling anything else up. Eric > > Thank you, > > Dave Smith > |
|
From: Jae-Joon L. <lee...@gm...> - 2010-03-13 14:47:21
|
On Fri, Mar 12, 2010 at 11:11 AM, jdidion <jd...@em...> wrote: > but I > can't figure out how to make this happen, other than to use a really fat > line width (which I would prefer not to do) What other way do you have in mind? I don't see any. By the way, why not just use histogram? Regards, -JJ |
|
From: Ryan M. <rm...@gm...> - 2010-03-13 01:47:21
|
On Fri, Mar 12, 2010 at 1:15 PM, Alex S <sch...@gm...> wrote: > Hi there, does anyone know if there's a simple way to set an axis limit to a > date? "viewlim_to_dt()" looks promising, but I can't figure out how to use > it... If you've plotted using dates, just use dates for the limits: import matplotlib.pyplot as plt import numpy as np from datetime import datetime, timedelta s = datetime.now() x = np.array([s, s + timedelta(hours=3)]) y = np.arange(1,3) plt.plot(x,y) plt.xlim(s - timedelta(minutes=30), s + timedelta(hours=4)) plt.show() Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: Jae-Joon L. <lee...@gm...> - 2010-03-12 23:25:08
|
On Fri, Mar 12, 2010 at 3:47 PM, Alan G Isaac <ala...@gm...> wrote: > I suggest instead > "These values are measure in font-size units. > E.g., a fontsize of 10 points and a handlelength=5 > implies a handlelength of 50 points." > Thanks. Applied in r8159. Regards, -JJ |
|
From: John H. <jd...@gm...> - 2010-03-12 21:02:42
|
Note that there is a significant bug in the path.simplify code in the latest released version that is fixed in svn. The simplification should not be visible to the human eye. Please try the release candidate at http://drop.io/xortel1# if you don't have access to svn JDH On Fri, Mar 12, 2010 at 2:12 PM, Tornes, Ivan E <to...@ba...> wrote: > > Thanks for the information. I'll give the suggestions a try. In the meantime setting Simplify = True in the matplotlibrc file gets it to plot without failing. > > I know I lose some of the screen information by doing this, but I can live with that for now, so I can continue work on the rest of my project. |
|
From: Alan G I. <ala...@gm...> - 2010-03-12 20:47:43
|
> On Thu, Mar 11, 2010 at 8:32 PM, Alan G Isaac <ai...@am...> wrote: > > 1. What are the units (and why not points)? On 3/11/2010 11:00 PM, Jae-Joon Lee wrote: > Fraction of (legend) font size (in points). It was decided that it is > these dimensions are better to be scale with font size. > For example, handlelength=5 means 50 points when legend font size is 10 points. OK, I see the reasoning, although I personally would still prefer points. In any case, I see that this information was in the documentation, but I failed to understand it. The documentation reads: "The dimensions of these values are given as a fraction of the fontsize." I suggest instead "These values are measure in font-size units. E.g., a fontsize of 10 points and a handlelength=5 implies a handlelength of 50 points." Thanks! Alan Isaac |
|
From: Gökhan S. <gok...@gm...> - 2010-03-12 20:36:22
|
Hello,
I read a simple data stream from my computers serial port. I can nicely read
the data using pyserial library but couldn't get it *nicely* working neither
with WXAgg nor Qt4Agg using the following code. Although with WX I could get
updated looks, the figure isn't very responsive in this way. I have looked
at simple_idle_wx example but for some reason I can't make it work to update
the canvas whenever the condition satisfied.
What is the trick to make the real-time data plotted on the screen easily
without blocking the figure itself?
import serial
import matplotlib.pyplot as plt
plt.ion()
ser = serial.Serial(0)
conc = []
while True:
s = ser.readline()
if s.startswith('CONC'):
conc.append(float(s.split()[2]))
plt.plot(conc)
plt.show()
plt.clf()
ser.close()
--
Gökhan
|
|
From: Alex S <sch...@gm...> - 2010-03-12 20:01:13
|
Ah perfect, thanks a lot, sorry for the mundane question :) -- View this message in context: http://old.nabble.com/xlim-with-dates-tp27881612p27882177.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: othererik <oth...@gm...> - 2010-03-12 19:50:02
|
Alex S wrote:
>
> Hi there, does anyone know if there's a simple way to set an axis limit to
> a date? "viewlim_to_dt()" looks promising, but I can't figure out how to
> use it...
>
> Thanks a lot,
> Alex
>
Alex,
I've done something like this in the past:
ax.set_xlim( ( min_val, max_val ) )
# improve formatting
fig.autofmt_xdate( bottom = 0.20000000000000001, rotation = 30,
ha = 'right' )
where min_val and max_val are values from
matplotlib.dates.date2num( dt ) because
dt is a datetime object, which is not the format matplotlib
uses.
So, setting the xlimit ( or ylimit ) using the values expected by
matplotlib manually is one option.
def date2num(d):
"""
*d* is either a :class:`datetime` instance or a sequence of datetimes.
Return value is a floating point number (or sequence of floats)
which gives number of days (fraction part represents hours,
minutes, seconds) since 0001-01-01 00:00:00 UTC.
"""
-Erik
--
View this message in context: http://old.nabble.com/xlim-with-dates-tp27881612p27882067.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Alex S <sch...@gm...> - 2010-03-12 19:16:05
|
Hi there, does anyone know if there's a simple way to set an axis limit to a date? "viewlim_to_dt()" looks promising, but I can't figure out how to use it... Thanks a lot, Alex -- View this message in context: http://old.nabble.com/xlim-with-dates-tp27881612p27881612.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: John H. <jd...@gm...> - 2010-03-12 18:37:18
|
On Fri, Mar 12, 2010 at 12:15 PM, Eric Firing <ef...@ha...> wrote: > This example is mostly obsolete--the clipping procedure is built-in. (The > value added by the example is the change in marker style.) Right, which is what I was trying to get at in the following: While this may not solve your case, because it looks like you may be exceeding the rendering complexity with data in the viewport, the design pattern may help inspire to you to write a custom class to handle adaptively decimating your data so you can still see a sketch of your data when panned out, but nonethless get the full detail when zoomed in. What I was trying to point out is you can hook into the event handling / callback mechanism to do *custom* level of detail clipping based on viewport or some other feature if the default simplification is not adequate. Along these lines Ivan, you may want to take a look at the event handling tutorial http://matplotlib.sourceforge.net/users/event_handling.html Perhaps we should wework the example to do something more useful that is not already handled better by path simplification. JDH |
|
From: Eric F. <ef...@ha...> - 2010-03-12 18:15:41
|
John Hunter wrote: > On Fri, Mar 12, 2010 at 8:30 AM, Tornes, Ivan E <to...@ba...> wrote: >> I’m working on a project that handles large data sets. Up to this point I >> had not had any issues using matplotlib, but I tried yesterday to have it >> plot a file that had 8 million float,float pairs in it and dies with the >> following message: > > There have been some enhancements in path simplification in svn, so > you may want to try this but no guarantees this will help > > http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn > > Alternatively, you could use something like the "clippedline" example. > The basic idea is that most screen devices have order of a couple > million pixels, so there is no way to resolve more points than that. > But you may want to be able to zoom into a certain region will full > detail, which is not possible if you decimate your data before hand. > What the clippedline demo does is just pass the points that are in the > current viewport to mpl. > > http://matplotlib.sourceforge.net/examples/pylab_examples/clippedline.html John, This example is mostly obsolete--the clipping procedure is built-in. (The value added by the example is the change in marker style.) Path simplification does a more thorough and general job of clipping. The reason for having the pre-clipping in the special but common case of monotonic x is that it can take advantage of a binary search, which is faster than the path-simplification's linear search for large datasets. Eric > > While this may not solve your case, because it looks like you may be > exceeding the rendering complexity with data in the viewport, the > design pattern may help inspire to you to write a custom class to > handle adaptively decimating your data so you can still see a sketch > of your data when panned out, but nonethless get the full detail when > zoomed in. > > This is in part what what the path simplification algorithm tries to > achieve, so do take a look if things work better on svn HEAD. > > Hope this helps, > JDH > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: John H. <jd...@gm...> - 2010-03-12 16:40:57
|
On Fri, Mar 12, 2010 at 8:30 AM, Tornes, Ivan E <to...@ba...> wrote: > I’m working on a project that handles large data sets. Up to this point I > had not had any issues using matplotlib, but I tried yesterday to have it > plot a file that had 8 million float,float pairs in it and dies with the > following message: There have been some enhancements in path simplification in svn, so you may want to try this but no guarantees this will help http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn Alternatively, you could use something like the "clippedline" example. The basic idea is that most screen devices have order of a couple million pixels, so there is no way to resolve more points than that. But you may want to be able to zoom into a certain region will full detail, which is not possible if you decimate your data before hand. What the clippedline demo does is just pass the points that are in the current viewport to mpl. http://matplotlib.sourceforge.net/examples/pylab_examples/clippedline.html While this may not solve your case, because it looks like you may be exceeding the rendering complexity with data in the viewport, the design pattern may help inspire to you to write a custom class to handle adaptively decimating your data so you can still see a sketch of your data when panned out, but nonethless get the full detail when zoomed in. This is in part what what the path simplification algorithm tries to achieve, so do take a look if things work better on svn HEAD. Hope this helps, JDH |
|
From: Jim V. <Jim...@no...> - 2010-03-12 16:12:58
|
Pierre de Buyl wrote: > change line 29 to: > left, bottom, width, height = 0.1, 0.07, 1., 0.84 # values in 0-1 > relative figure coordinates -- allow space on left for colorbar > > it works on my machine (python 2.5 and mpl 0.99, mac os X 10.4). > > Pierre > Le 11 mars 10 à 23:36, Jim Vickroy a écrit : Thanks Pierre. Your suggestion (along with a change in the figsize parameter setting) got me going in the right direction -- so to speak. -- jv > >> Hello, >> >> The attached script was used to generate the attached figure. >> >> I am seeking guidance on how to (at run-time) reduce the width of the >> (black) border on the right side of the figure. >> >> All of my attempts have either cropped the color bar (on the left) or >> shifted the color bar over the "image" area of the figure. >> >> Thanks, >> -- jv >> >> P.S. >> I'm using Python 2.6.4 and matplotlib 0.99.1. >> <figure with colorbar on left.py><trial.png> >> ------------------------------------------------------------------------------ >> >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev_______________________________________________ >> >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: jdidion <jd...@em...> - 2010-03-12 16:11:44
|
I am using vlines to draw multiple bar graphs in a single figure. I would like for lines at adjacent x-values to have no gap between them, but I can't figure out how to make this happen, other than to use a really fat line width (which I would prefer not to do). Any help is appreciated. I can make the code available if necessary. |
|
From: Andre Walker-L. <wal...@gm...> - 2010-03-12 15:22:26
|
Hi All, An update: I have likely figured out the problem. When I did a fresh install of Python-2.6 on my mac, I simply used ./configure and reading more about installing on the mac, I believe I should have used ./configure --enable-framework to support all the GUI stuff. Well, I tried this, but got the warning, Failed to find the necessary bits to build these modules: _bsddb gdbm linuxaudiodev ossaudiodev readline spwd sunaudiodev so, instead of trying to track down the solution to this problem (I am still new at learning how to properly install software from binaries) I just grabbed the latest python-2.6 .dmg file for mac, and installed with that. Now, everything seems to work fine. :) Cheers, Andre On Mar 11, 2010, at 4:56 PM, James Boyle wrote: > I have the same problem with nearly identical setup: > OS X 10.5.8 - intel > matplotlib 99.1.1 > python 2.6.1 > ipython 0.9.1 > numpy-1.3.0 > > --Jim > > > On Mar 11, 2010, at 1:31 PM, Andre Walker-Loud wrote: > >> Hi All, >> >> I am having a problem saving figures produced with matplotlib. Right >> now, I am running a freshly built >> >> matplotlib-0.99.1.2 (unzipped, the directory reads 0.99.1.1?) built >> on >> python-2.6 >> numpy-1.3.0 >> scipy-0.7.1 >> ipython-0.10 >> >> >> All on an OSX 10.5 intel. >> >> When I try to save a figure, in the "Save the figure" dialogue box, >> the "Save As:" window does not recognize any keyboard entries. If I >> copy and paste, that works (at first). But I remembered reading >> about >> this problem people were having with Snow Leopard. >> >> Originally, copy/pasting worked to "workaround" this problem, but I >> find that after trying a few other things, I can no longer even paste >> anything into the "Save As:" Box. Further, when I click the "Save" >> or >> "Cancel" buttons, they flash like normal, however the dialogue box >> does not go away, the file is not saved, and I can't escape! >> Ahhhhhh! I can still navigate through my folders with the mouse in >> the dialogue box, but clearly something is not right. >> >> >> Last week, I had Python 2.5, matplotlib 0.98.6 and everything worked >> just fine. >> >> I have the problem whether running through python or ipython.asdfasdf >> >> >> Any ideas how to fix this? >> >> >> Thanks, >> >> Andre >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://*p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://*lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Pierre de B. <pd...@ul...> - 2010-03-12 15:14:49
|
change line 29 to: left, bottom, width, height = 0.1, 0.07, 1., 0.84 # values in 0-1 relative figure coordinates -- allow space on left for colorbar it works on my machine (python 2.5 and mpl 0.99, mac os X 10.4). Pierre Le 11 mars 10 à 23:36, Jim Vickroy a écrit : > Hello, > > The attached script was used to generate the attached figure. > > I am seeking guidance on how to (at run-time) reduce the width of > the (black) border on the right side of the figure. > > All of my attempts have either cropped the color bar (on the left) > or shifted the color bar over the "image" area of the figure. > > Thanks, > -- jv > > P.S. > I'm using Python 2.6.4 and matplotlib 0.99.1. > <figure with colorbar on left.py><trial.png> > ---------------------------------------------------------------------- > -------- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw- > dev_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Tornes, I. E <to...@ba...> - 2010-03-12 15:00:19
|
I'm working on a project that handles large data sets. Up to this point I had not had any issues using matplotlib, but I tried yesterday to have it plot a file that had 8 million float,float pairs in it and dies with the following message:
pException in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1413, in __call__
return self.func(*args)
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_tkagg.py", line 212, in resize
self.show()
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_tkagg.py", line 215, in draw
FigureCanvasAgg.draw(self)
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py", line 314, in draw
self.figure.draw(self.renderer)
File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in draw_wrapper
draw(artist, renderer, *kl)
File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 774, in draw
for a in self.axes: a.draw(renderer)
File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in draw_wrapper
draw(artist, renderer, *kl)
File "/usr/lib/pymodules/python2.6/matplotlib/axes.py", line 1721, in draw
a.draw(renderer)
File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in draw_wrapper
draw(artist, renderer, *kl)
File "/usr/lib/pymodules/python2.6/matplotlib/lines.py", line 535, in draw
drawFunc(renderer, gc, tpath, affine.frozen())
File "/usr/lib/pymodules/python2.6/matplotlib/lines.py", line 874, in _draw_lines
self._lineFunc(renderer, gc, path, trans)
File "/usr/lib/pymodules/python2.6/matplotlib/lines.py", line 918, in _draw_solid
renderer.draw_path(gc, path, trans)
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py", line 98, in draw_path
self._renderer.draw_path(gc, path, transform, rgbFace)
RuntimeError: Agg rendering complexity exceeded. Consider downsampling or decimating your data.
I would prefer to not decimate my data if possible.
Ivan E. Tornes
|
|
From: othererik <oth...@gm...> - 2010-03-12 12:45:28
|
Jae-Joon Lee wrote: > > > Please post a complete example that demonstrate your problem. My guess > is that maybe you are not setting the transform of the clipping path > correctly. > Regards, > > -JJ > > > Here's a short example that does the opposite of what I'm looking for. The goal is to take a the polygon "poly_patch" and "cut" regions out of it. All I've managed to achieve so far has been to show regions of the "poly_patch". I'm apparently missing a detail somewhere. Thanks for the help! --- import matplotlib from matplotlib import patches import pylab fig=pylab.figure() ax=fig.add_subplot(111) # background line line = ax.plot( [ 1, 2, 3], [ 1, 2, 3 ] ) # part I would like to see through hole_patch = patches.Circle((2,2), radius=.5, facecolor='none') # mask polygon that should cover/hide the area not intersecting the "hole_patch" poly_patch = patches.Polygon(((1,1),(1,3),(3,3), (3,1))) ax.add_patch( hole_patch ) ax.add_patch( poly_patch ) # gets the opposite effect intended poly_patch.set_clip_path( hole_patch ) pylab.show() -- View this message in context: http://old.nabble.com/Remove%2C-mask%2C-or-hide-parts-of-a-polygon--tp27842142p27874544.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Jae-Joon L. <lee...@gm...> - 2010-03-12 04:00:54
|
On Thu, Mar 11, 2010 at 8:32 PM, Alan G Isaac <ai...@am...> wrote: > 1. What are the units (and why not points)? Fraction of (legend) font size (in points). It was decided that it is these dimensions are better to be scale with font size. For example, handlelength=5 means 50 points when legend font size is 10 points. > 2. Can this be set on a legend object (after creation)? > (There does not appear to be a setter on the legend; > do I have to get the handles and set each?) > Right now, public setter method is not supported for these attributes. While this is possible it is a bit tricky. I need to double-check but you need to change the dimension of not only the associated artist (e.g., lines) but also its container (offsetbox). The current design recommends you to create a new legend (by calling legend again) if you want to change its attribute. If this approach is not applicable, please describe your use case. Regards, -JJ As of now, some (maybe most) of legend attributes are not exposed is possible but a bit tricky to do |