Re: [Matplotlib-users] matplotlib on mac os x question
Hi Walid, I'm new to mpl, too, but I just installed it on OSX and first had that problem, too. I solved it because I did not have libpng/ libjpeg installed, for which a pkg installer for OSX is available here: http://ethan.tira-thompson.org/Mac_OS_X_Ports.html Hope this solves your problem, too! Regards, Florian On 18 Aug 2009, at 02:11, Walid Majid wrote: Hi, I am new to matplotlib and having trouble running a simple example, which I found on one of the tutorial pages: import matplotlib.pyplot as plt plt.plot([1,2,3]) plt.ylabel('some numbers') plt.show() The problem I encounter is that no plot actually shows up when I run the above sequence on my idle session. I am running on Mac OS X 10.5.6 and if anyone can give me some help, I would appreciate it. Python: 2.5.4 idle: 1.2.4 matplotlib: 0.98.5.3 WM -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users **NOTA DE CONFIDENCIALIDAD** Este correo electrónico, y en su caso los ficheros adjuntos, pueden contener información protegida para el uso exclusivo de su destinatario. Se prohíbe la distribución, reproducción o cualquier otro tipo de transmisión por parte de otra persona que no sea el destinatario. Si usted recibe por error este correo, se ruega comunicarlo al remitente y borrar el mensaje recibido. **CONFIDENTIALITY NOTICE** This email communication and any attachments may contain confidential and privileged information for the sole use of the designated recipient named above. Distribution, reproduction or any other use of this transmission by any party other than the intended recipient is prohibited. If you are not the intended recipient please contact the sender and delete all copies. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] xticklabels possition on a bar chart
My lables for the different bars are not centered below the bar but are all to the left side of the bars (lower left corner). This is what I am basically doing: axes = panel.figure.add_subplot(2, 2, 3) ... axes.bar(indx, values, color=colors) axes.set_xticklabels(labels) I can not find how to provide the lables to the "bar" call or how else to make sure that "Rot" is centered under the first bar, "Weiß" under the second bar and so on. Ideally I would like to have these labels printed at an angle. Appreciate any hints Werner P.S. mpl version: '0.99.0' Python 2.5.2 on Vista -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] figure legend with mplot3d
the patch3dcollection object not good for legend figure, I am having trouble thinking of a work around. Is there manually a way to insert artist and labels into the legend and make it such that it is independent from the axes? Using a proxy artist requires it not be part of the axes correct? -- View this message in context: http://www.nabble.com/figure-legend-with-mplot3d-tp25029801p25029801.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] xticklabels possition on a bar chart
Werner F. Bruhin wrote: ... > Ideally I would like to have these labels printed at an angle. Put my glasses on and found the rotation property in the documentation, only issue left is centering the labels below the bars. Werner -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] animate histogram
OK, I mostly understand John's example and have adapted it in the attached Histogram class, for whoever might care. (The file is a working example.) Thanks! Here are my remaining questions. 1. To get a new histogram, I just change the data in the vertices object and then ask my FigureCanvasTkAgg to ``show`` itself. How does this work? (I suppose that this FigureCanvas has my figure, the figure references my axes, my axes references my PathPatch, and my PathPatch references the rectverts, and each looks to the next when I call show?) 2. This is pretty fast. Would there be additional speed gains to blitting, and if so, how would it be done? (I'm just asking for clues, not a complete example.) I expected to be able to set the animated property on the patch when I called ax.add_patch, but that does not work; am I supposed to just set it directly? (I had supposed that the axes were being informed e.g. when setting animated=True for an ax.plot, but now I'm guessing that supposition is wrong the `plot` just provides this as a convenience.) If I have unveiled some radical misconceptions, sorry, I don't have experience with GUI stuff. Thanks, Alan Isaac -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] animate histogram
Ooops, forgot the attachment. Alan """ Adapts John Hunter's example of how to use a path patch to draw a bunch of rectangles for an animated histogram """ import Tkinter as tk import numpy as np import matplotlib as mpl mpl.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg from matplotlib.figure import Figure class Histogram(FigureCanvasTkAgg): """Provides a simple normed histogram. Here `datafunc` returns a sequence (e.g., a list or array) containing a single iteration's data. :thanks: John Hunter showed in detail how to do this with a PathPatch (Aug 8, 2009, Matplotlib users mailing list) """ def __init__(self, datafunc, bins, master=None, title='', world=None, **kwargs): self._datafunc = datafunc self._tops = None self._edges = None self._rectverts = None self._xlim = None self._bins = bins self._title = title self._world = world self._background = None self._kwargs = kwargs self._fig = mpl.figure.Figure(figsize=(5,2.5), dpi=100) self._ax = self._fig.add_subplot(111, title=title) #grid the widget to master FigureCanvasTkAgg.__init__(self, self._fig, master=master) self.get_tk_widget().grid(row=0,column=1) def setup(self): self._ax.set_title(self._title, fontsize='x-small') # create the initial histogram self.update_data() self.create_rectangles_as_pathpatch() def update(self): """Return None. Update the histogram.""" # update the data (-> _tops) self.update_data() #update the vertices newtops = self._tops self._rectverts[1::5,1] = newtops self._rectverts[2::5,1] = newtops self.show() #crucial! def update_data(self): """Return sequence, the new data from `_datafunc`. """ data = self._datafunc() tops, edges = np.histogram(data, bins=self._bins, normed=True, **self._kwargs) self._tops, self._edges = tops, edges def create_rectangles_as_pathpatch(self): global rectverts """ The tricky part: we construct the rectangles as a `mpl.path` http://matplotlib.sourceforge.net/api/path_api.html and then add a mpl.patches.PathPatch to the axes. (Thanks to John Hunter, who posted this solution!!) """ ax = self._ax tops, edges = self._tops, self._edges # first create the vertices and associated rectvertcodes self._rectverts = rectverts = self.create_rectverts(tops, edges) numrects = len(tops) #keep it this way self._rectvertcodes = rectvertcodes = self.create_rectvertcodes(numrects) barpath = mpl.path.Path(rectverts, rectvertcodes) patch = mpl.patches.PathPatch(barpath, facecolor='green', edgecolor='yellow', alpha=0.5) self._patch = ax.add_patch(patch) self._xlim = xlim = (edges[0],edges[-1]) ax.set_xlim(xlim) ax.set_ylim(0,1) def create_rectverts(self, tops, edges): """Return array, the vertices for rectangles with bottoms 0, tops `tops`, and edges `edges`. Please refer to `create_rectvertcodes`: although the vert for the closepoly is ignored, we still need it to align with the rectvertcodes. """ numrects = len(tops) #keep it this way nverts = numrects*(1+3+1) #we will replace the tops; bottoms remain 0 rectverts = np.zeros((nverts, 2)) # get the corners of the rectangles for the histogram left_edges = np.array(edges[:-1]) right_edges = np.array(edges[1:]) rectverts[0::5,0] = left_edges rectverts[1::5,0] = left_edges rectverts[1::5,1] = tops rectverts[2::5,0] = right_edges rectverts[2::5,1] = tops rectverts[3::5,0] = right_edges return rectverts def create_rectvertcodes(self, numrects): """Return 1d array, the codes for rectangle creation. (Each rectangle is one moveto, three lineto, one closepoly.) """ numverts = numrects*(1+3+1) rectvertcodes = np.ones(numverts, int) * mpl.path.Path.LINETO rectvertcodes[0::5] = mpl.path.Path.MOVETO
Re: [Matplotlib-users] animate histogram
On Tue, Aug 18, 2009 at 12:53 PM, Alan G Isaac wrote: > OK, I mostly understand John's example and have > adapted it in the attached Histogram class, for > whoever might care. (The file is a working > example.) Thanks! > > Here are my remaining questions. > > 1. To get a new histogram, I just change the > data in the vertices object and then ask my > FigureCanvasTkAgg to ``show`` itself. How > does this work? (I suppose that this FigureCanvas > has my figure, the figure references my axes, my axes > references my PathPatch, and my PathPatch references > the rectverts, and each looks to the next when I call > show?) if you have already created the tk gui window and shown it, just call fig.canvas.draw() on each update of the vertices > 2. This is pretty fast. Would there be additional > speed gains to blitting, and if so, how would it > be done? (I'm just asking for clues, not a complete > example.) I expected to be able to set the animated > property on the patch when I called ax.add_patch, > but that does not work; am I supposed to just set > it directly? (I had supposed that the axes were > being informed e.g. when setting animated=True > for an ax.plot, but now I'm guessing that supposition > is wrong the `plot` just provides this as a convenience.) The animated property has to be on the patch itself, so when you create the path patch, you would do patch = patches.PatchPath(path, animated=True) ax.add_patch(patch) JDH -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] One more time: frame linewidth
I have asked this question before. How do I set the linewidth of the axis frame? Long ago, I used gca().get_frame().set_linewidth(2). More recently, I used gca().frame.set_linewidth(2), but this doesn't seem to work anymore. I've tried gca().patch, to no avail. Any suggestions? Thanks. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] animate histogram
On Tue, Aug 18, 2009 at 1:53 PM, Alan G Isaac wrote: > 2. This is pretty fast. Would there be additional > speed gains to blitting, and if so, how would it > be done? (I'm just asking for clues, not a complete > example.) Blitting will improve the performance when significant portion of your plot is (semi-)stationary. And I guess your example, as it is, may not benefit from blitting. A. init 1. draw stationary artists (animated=False) on the canvas 2. save the area of canvas as a pixmap array. B. looping for animation 1. restore the stationary artists by blitting the saved pixmap array 2. draw animated artists. 3. optionally update the saved pixmap. And your speed gain comes from B.1 Regards, -JJ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] One more time: frame linewidth
I guess you're using 0.99? Use spines instead. for example, gca().spines["bottom"].set_linewidth(2) # it only changes the linewidth of the bottom spine. also, see this example, http://matplotlib.sourceforge.net/examples/pylab_examples/spine_placement_demo.html#pylab-examples-spine-placement-demo Regards, -JJ On Tue, Aug 18, 2009 at 5:18 PM, Christopher Brown wrote: > I have asked this question before. How do I set the linewidth of the > axis frame? Long ago, I used gca().get_frame().set_linewidth(2). More > recently, I used gca().frame.set_linewidth(2), but this doesn't seem to > work anymore. I've tried gca().patch, to no avail. Any suggestions? > > Thanks. > > -- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] heatmap with varying size boxes?
Hello, I have a list of X,Y coordinates and a ratio associated with each coordinate. The X and Y coordinates are continuous but random from 50-500, I would like to make a continuous heatmap of the ratios at each coordinate. One caveat is that the coordinates are clustered together do some bixes might have too little data. I am wondering if there is a way that R can automatically adjust box sizes? Sample data set is below TIA XYRATIO 5056.1 5059.1 5254.2 500393.9 45036.7 250190.7 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] figure legend with mplot3d
On Tue, Aug 18, 2009 at 1:33 PM, dek wrote: > > the patch3dcollection object not good for legend figure, I am having trouble > thinking of a work > around. Is there manually a way to insert artist and labels into the legend > and make it such that it is independent from the axes? Using a proxy artist > requires it not be part of the axes correct? It actually does not matter. But in most cases, you do not want to see the proxy artists (except in the legend), and easiest solution is just not to add them to any axes. See the link below. http://matplotlib.sourceforge.net/users/legend_guide.html#using-proxy-artist Regards, -JJ > -- > View this message in context: > http://www.nabble.com/figure-legend-with-mplot3d-tp25029801p25029801.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > -- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] histogram of mean & SD
Can anyone explain how I could: -Open two shapefiles -Open a raster -Plot a histogram of the values within each shapefile on the same plot and display the mean and Standard Deviation of each plot. Thanks -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] xticklabels possition on a bar chart
You need to adjust the positions of the ticks. bar command (by default) creates boxes so that their left side corresponds the first argument. http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.bar so, in your case, something like below will work (0.4 from 0.8/2 where 0.8 is the default width of the bar). axes.set_xticks([x+0.4 for x in indx]) Alternatively, bars can be center-aligned. See the docs for more, Also, take a look at the example below (there are bunch of other examples in the gallery) http://matplotlib.sourceforge.net/examples/pylab_examples/bar_stacked.html -JJ On Tue, Aug 18, 2009 at 1:29 PM, Werner F. Bruhin wrote: > My lables for the different bars are not centered below the bar but are all > to the left side of the bars (lower left corner). > > > > This is what I am basically doing: > > axes = panel.figure.add_subplot(2, 2, 3) > ... > axes.bar(indx, values, color=colors) > axes.set_xticklabels(labels) > > I can not find how to provide the lables to the "bar" call or how else to > make sure that "Rot" is centered under the first bar, "Weiß" under the > second bar and so on. > > Ideally I would like to have these labels printed at an angle. > > Appreciate any hints > Werner > > P.S. > mpl version: '0.99.0' > Python 2.5.2 on Vista > > -- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] xticklabels possition on a bar chart
Werner F. Bruhin wrote: > Werner F. Bruhin wrote: > ... >> Ideally I would like to have these labels printed at an angle. > Put my glasses on and found the rotation property in the documentation, > only issue left is centering the labels below the bars. Are you using the align='center' kwarg to bar()? Eric -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] how to get the properties for elements in a collection?
sct1 = axes.scatter(x,y, c=some_list, cmap=plt.get_cmap(colmap)) colors = sct1.get_facecolors() The return value is an array of rgb values. -JJ On Mon, Aug 17, 2009 at 3:40 PM, Carlos Grohmann wrote: > Hi, I have a collection, which is a scatter plot, and I want to > iterate through all the elements in this collection and retrieve their > properties, like facecolor. > > the scatterplot is created like this: > > axes.scatter(x,y, c=some_list, cmap=plt.get_cmap(colmap)) > > many thanks > > -- > Carlos Henrique Grohmann - Geologist D.Sc. > a.k.a. Guano - Linux User #89721 > ResearcherID: A-9030-2008 > > http://digitalelevation.blogspot.com > > http://www.igc.usp.br/pessoais/guano > _ > Can’t stop the signal. > > -- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] how to get the properties for elements in a collection?
See below for available public methods. http://matplotlib.sourceforge.net/api/collections_api.html#matplotlib.collections.Collection -JJ On Tue, Aug 18, 2009 at 6:16 PM, Jae-Joon Lee wrote: > sct1 = axes.scatter(x,y, c=some_list, cmap=plt.get_cmap(colmap)) > colors = sct1.get_facecolors() > > The return value is an array of rgb values. > > -JJ > > > On Mon, Aug 17, 2009 at 3:40 PM, Carlos > Grohmann wrote: >> Hi, I have a collection, which is a scatter plot, and I want to >> iterate through all the elements in this collection and retrieve their >> properties, like facecolor. >> >> the scatterplot is created like this: >> >> axes.scatter(x,y, c=some_list, cmap=plt.get_cmap(colmap)) >> >> many thanks >> >> -- >> Carlos Henrique Grohmann - Geologist D.Sc. >> a.k.a. Guano - Linux User #89721 >> ResearcherID: A-9030-2008 >> >> http://digitalelevation.blogspot.com >> >> http://www.igc.usp.br/pessoais/guano >> _ >> Can’t stop the signal. >> >> -- >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> ___ >> Matplotlib-users mailing list >> Matplotlib-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Line2D on multiple plots?
On Mon, Aug 17, 2009 at 10:29 AM, Ole Streicher wrote: > Hi, > > I want to show the same data on multiple plots. Is it possible to re-use > the Line2D object for that? t.m., > > line = axes1.plot(xdata, ydata, ...) > > ... > > axes2.lines.append(line) > > Or is a Line2D bound to a certain axes instance? > I guess you already know the answer as this can be easily tested. For the record, the answer is Yes, all matplotlib artists are bound to a certain axes. You may come up with some workaround by updating the axes-related properties before each draw call, but the easiest solution seems to be creating multiple artists. -JJ > Best regards > > Ole > > > > > -- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] heatmap with varying size boxes?
> 2009/8/18 Pete Shepard : > I have a list of X,Y coordinates and a ratio associated with each > coordinate. The X and Y coordinates are continuous but random from 50-500, I > would like to make a continuous heatmap of the ratios at each coordinate. > One caveat is that the coordinates are clustered together do some bixes > might have too little data. I am wondering if there is a way that R can > automatically adjust box sizes? Sample data set is below > > TIA > > X Y RATIO > 50 56 .1 > 50 59 .1 > 52 54 .2 > 500 393 .9 > 450 36 .7 > 250 190 .7 I'm not sure about R, this is a Python mailing list :) Are you trying to do something like this http://matplotlib.sourceforge.net/examples/pylab_examples/scatter_demo2.html or to interpolate your data from scattered points onto a regular grid? Cheers, Scott -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users