[Matplotlib-users] 3 questions about tick labels for large values
Folks, I need your wisdom about ticks labels on ordinates for large numbers (>1e4). The default behavior I have (0.87.4) is to display tick labels as "%.1f", and write a string "x1e+..." above the top left corner of the current axes. - When using "yaxis.tick_right()", the "x1e..." string stays above the top left corner. That becomes an issue when using two different scales. How could I force the 'mantissa' string to be on the same side as the axis it depends on ? - How could I change the number of decimals being displayed (for example, "%.3f" instead of "%.1f"), while keeping the mantissa string ? (I tried a "FormatStrFormatter("%.3f"), it's not what I want. With "Funcformatter(lambda x,pos: "%.3f"%(x/1000)))", I lose the mantissa string...) - Personally, I'm not keen on "3.0 x1e+4", I prefer "30 x1e+3". Is there a way to get that ? I guess that with a bit of trial/error with FuncFormatter and fig.text, I should be able to get what I want, but I wanted to check whether there was some easier solutions. Thanks in advance for your help P. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ANN: matplotlib-0.87.4 (bugfix release for enthon)
On Tue, Jul 11, 2006 at 10:53:59PM -0400, Charlie Moad wrote: > 2006-06-22 Added support for numerix 2-D arrays as alternatives to >a sequence of (x,y) tuples for specifying paths in >collections, quiver, contour, pcolor, transforms. >Fixed contour bug involving setting limits for >color mapping. Added numpy-style all() to numerix. - EF It would be useful to have plot accept a 2-D array as well. Would patches for this be considered, or is there some reason why this can't work? At the moment, doing P.plot(z) where z is Nx2, raises RuntimeError: xdata and ydata must be the same length So it doesn't look as though this functionality will override any current feature. Regards Stéfan - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ANN: matplotlib-0.87.4 (bugfix release for enthon)
The modules have been imported into the matplotlib repository, and they are semi-functional. They still need a lot of work though. There is a new example, simple3d_oo.py. - Charlie On 7/11/06, imcs ee <[EMAIL PROTECTED]> wrote: > what about the mplot3d. (http://www.scipy.org/Cookbook/Matplotlib/mplot3D) > it works nice under matplotlib0.86.2 > but it can't work under matplotlib 0.87.3(with numpy or numeric). > > On 7/12/06, Charlie Moad <[EMAIL PROTECTED]> wrote: > > On 7/7/06, John Hunter <[EMAIL PROTECTED]> wrote: > > > > > > We'd like to do a bugfix release for the next release of enthought > > > python, which will include the latest mpl. Apparently, there is a > > > problem with 0.87.3 and numpy which has been fixed in svn. > > > > > > If there is anything we should wait on, let us know, otherwise we'll > > > probably try to roll out 0.87.4 early next week. > > > > > > Thanks, > > > JDH > > > > http://cheeseshop.python.org/pypi/matplotlib/ > > http://sourceforge.net/project/showfiles.php?group_id=80706 > > > > === > > 2006-07-11 Released 0.87.4 at revision 2558 > > > > 2006-07-07 Fixed a usetex bug with older versions of latex - DSD > > > > 2006-07-07 Add compatibility for NumPy 1.0 - TEO > > > > 2006-06-29 Added a Qt4Agg backend. Thank you James Amundson - DSD > > > > 2006-06-26 Fixed a usetex bug. On windows, usetex will prcess > > postscript output in the current directory rather than > > in a temp directory. This is due to the use of spaces > > and tildes in windows paths, which cause problems with > > latex. The subprocess module is no longer used. - DSD > > > > 2006-06-22 Various changes to bar(), barh(), and hist(). > > Added 'edgecolor' keyword arg to bar() and barh(). > > The x and y args in barh() have been renamed to width > > and bottom respectively, and their order has been swapped > > to maintain a (position, value) order ala matlab. left, > > height, width and bottom args can now all be scalars or > > sequences. barh() now defaults to edge alignment instead > > of center alignment. Added a keyword arg 'align' to bar(), > > barh() and hist() that controls between edge or center bar > > alignment. Fixed ignoring the rcParams['patch.facecolor'] > > for bar color in bar() and barh(). Fixed ignoring the > > rcParams['lines.color'] for error bar color in bar() > > and barh(). Fixed a bug where patches would be cleared > > when error bars were plotted if rcParams['axes.hold'] > > was False. - MAS > > > > 2006-06-22 Added support for numerix 2-D arrays as alternatives to > > a sequence of (x,y) tuples for specifying paths in > > collections, quiver, contour, pcolor, transforms. > > Fixed contour bug involving setting limits for > > color mapping. Added numpy-style all() to numerix. - EF > > > > 2006-06-20 Added custom FigureClass hook to pylab interface - see > > examples/custom_figure_class.py > > > > 2006-06-16 Added colormaps from gist (gist_earth, gist_stern, > > gist_rainbow, gist_gray, gist_yarg, gist_heat, gist_ncar) - JW > > > > 2006-06-16 Added a pointer to parent in figure canvas so you can > > access the container with fig.canvas.manager. Useful if > > you want to set the window title, eg in gtk > > fig.canvas.manager.window.set_title, though a GUI neutral > > method would be preferable JDH > > > > 2006-06-16 Fixed colorbar.py to handle indexed colors (i.e., > > norm = no_norm()) by centering each colored region > > on its index. - EF > > > > 2006-06-15 Added scalex and scaley to Axes.autoscale_view to support > > selective autoscaling just the x or y axis, and supported > > these command in plot so you can say plot(something, > > scaley=False) and just the x axis will be autoscaled. > > Modified axvline and axhline to support this, so for > > example axvline will no longer autoscale the y axis. JDH > > > > 2006-06-13 Fix so numpy updates are backward compatible - TEO > > > > 2006-06-12 Updated numerix to handle numpy restructuring of > > oldnumeric - TEO > > > > 2006-06-12 Updated numerix.fft to handle numpy restructuring > > Added ImportError to numerix.linear_algebra for numpy -TEO > > > > 2006-06-11 Added quiverkey command to pylab and Axes, using > > QuiverKey class in quiver.py. Changed pylab and Axes > > to use quiver2 if possible, but drop back to the > > newly-renamed quiver_classic if necessary. Modified > > examples/quiver_demo.py to illustrate the new quiver > > and quiverkey. Changed LineCollection implementation > > slightly to improve compatibility with PolyCollection. - EF > > >
[Matplotlib-users] Delete a plot line in interactive mode?
Hi, I'm new to matplotlib and am very impressed! I have a beginner type question: In interactive mode (using the GtkAgg backend) I'll plot multiple lines on a single subplot. The output got clutterred so I was looking for a pylab command to remove one of the plot lines but could not find any easy way to do this. Is this the case? Do I have to clear the current axes(cla) and replot all my lines minus the line I don't want? Something like this would be nice: line_nbr = 3 # delete third line on the current axes deleteline(line_nbr) Thanks, Mike __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ANN: matplotlib-0.87.4 (bugfix release for enthon)
On Wed, 12 Jul 2006, Stefan van der Walt apparently wrote: > It would be useful to have plot accept a 2-D array as well. Would > patches for this be considered, or is there some reason why this can't > work? At the moment, doing > P.plot(z) where z is Nx2 If 2-D is allowed, I hope N×K is allowed, not just N×2. Cheers, Alan Isaac - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 3 questions about tick labels for large values
Hello, um..., P., On Wednesday 12 July 2006 03:43, PGM wrote: > Folks, > I need your wisdom about ticks labels on ordinates for large numbers > (>1e4). The default behavior I have (0.87.4) is to display tick labels as > "%.1f", and write a string "x1e+..." above the top left corner of the > current axes. > > - When using "yaxis.tick_right()", the "x1e..." string stays above the top > left corner. That becomes an issue when using two different scales. How > could I force the 'mantissa' string to be on the same side as the axis it > depends on ? I'll take care of this, but I will need a few days. > - How could I change the number of decimals being displayed (for example, > "%.3f" instead of "%.1f"), while keeping the mantissa string ? (I tried a > "FormatStrFormatter("%.3f"), it's not what I want. With > "Funcformatter(lambda x,pos: "%.3f"%(x/1000)))", I lose the mantissa > string...) You can write your own custom formatter to do this. You can use ticker.ScalarFormatter as a guide. > - Personally, I'm not keen on "3.0 x1e+4", I prefer "30 x1e+3". Is there a > way to get that ? Again, this could be handled by a custom formatter. > I guess that with a bit of trial/error with FuncFormatter and fig.text, I > should be able to get what I want, but I wanted to check whether there was > some easier solutions. Darren - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Delete a plot line in interactive mode?
> "Michael" == Michael <[EMAIL PROTECTED]> writes: Michael> Hi, I'm new to matplotlib and am very impressed! Thanks! Michael> I have a beginner type question: Michael> In interactive mode (using the GtkAgg backend) I'll plot Michael> multiple lines on a single subplot. The output got Michael> clutterred so I was looking for a pylab command to remove Michael> one of the plot lines but could not find any easy way to Michael> do this. Michael> Is this the case? Do I have to clear the current Michael> axes(cla) and replot all my lines minus the line I don't Michael> want? Michael> Something like this would be nice: line_nbr = 3 # delete Michael> third line on the current axes deleteline(line_nbr) You have two options -- the axes stores the lines in a plain-ol-list, and you can manipulate that list like any python list If you know the line number, ie, the i-th line you've added to the list del ax.lines[linenumber] if you don't know the line number, but have an instance of the line l, = ax.plot(x, y) ax.lines.remove(l) After you've removed the lines, you'll have to force a figure redraw In pylab, you can simply call draw() or using the API, use the figure canvas method canvas.draw() The containment relationship is Canvas holds a Figure holds an Axes, but each child has a pointer to its parent, so if you have access to an Axes instance ax.figure.canvas.draw() JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] IndexFormatter missing
Anyone know what happened to matplotlib.ticker.IndexFormatter? Is there are replacement for it?-- David Grant - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] IndexFormatter missing
> "David" == David Grant <[EMAIL PROTECTED]> writes: David> Anyone know what happened to David> matplotlib.ticker.IndexFormatter? Is there are replacement David> for it? I don't know -- I don't see anything in the changelog or in the svn log. What did it do, and what version of mpl had it? Sorry, but my memory is failing here... I don't see any IndexFormatter as far back as 0.83. There is an index locator however Perhaps you should just tell us what you want to do. JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ANN: matplotlib-0.87.4 (bugfix release for enthon)
Alan G Isaac wrote: > On Wed, 12 Jul 2006, Stefan van der Walt apparently wrote: > >>It would be useful to have plot accept a 2-D array as well. Would >>patches for this be considered, or is there some reason why this can't >>work? At the moment, doing >>P.plot(z) where z is Nx2 > > > If 2-D is allowed, > I hope N×K is allowed, > not just N×2. I have thought about this, but haven't gotten around to doing it. To do the whole job, we could handle a single NxK argument, and we could also handle pairs: Nx1, NxK NxK, Nx1 NxK, NxK I think it is clear what the behavior should be with any of the pairs; essentially they should be broadcast to the NxK, NxK case, resulting in K lines. In the single-argument NxK case, I think matlab plots subsequent columns against the first column. Is this what you would like? The alternative would be to plot each column against the row index, which is what happens in the Nx1 case, but I suspect the matlab-compatibility argument wins out here. Also, this maintains consistency with the original request for Nx2, which I assume was for plotting the second column against the first. I certainly would not want to have NxK behavior change as K goes from 2 to values larger than 2. Eric - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ANN: matplotlib-0.87.4 (bugfix release for enthon)
On Wed, 12 Jul 2006, Eric Firing apparently wrote: > In the single-argument NxK case, I think matlab plots > subsequent columns against the first column. Is this what > you would like? Yes. Cheers, Alan Isaac - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] IndexFormatter missing
On 7/12/06, John Hunter <[EMAIL PROTECTED]> wrote: > "David" == David Grant <[EMAIL PROTECTED]> writes:David> Anyone know what happened toDavid> matplotlib.ticker.IndexFormatter ? Is there are replacementDavid> for it?I don't know -- I don't see anything in the changelog or in the svnlog. What did it do, and what version of mpl had it? Sorry, but mymemory is failing here... I don't see any IndexFormatter as far back as 0.83. There is an index locator howeverI managed to accomplish what I wanted to do, using the FuncFormatter I think... Here's what I was doing. I am plotting results of graphs, graphs which have a certain number of edges. So I wanted to plot some statistic vs. number of edges. But the number of edges was not varied in a linear way but I have a list of which edges. So: edges=[54, 76, 80, 100]stats=[5.423, 23.226, 4.1, 6.93]So basically I wanted t=arange(len(stats) as my x-axis but edges for the labels (but only if it lies on a major tic). So I did: majorFormatter = ticker.FuncFormatter(lambda x, pos: labels[int(x)]) axis.xaxis.set_major_formatter(majorFormatter)If anyone knows a better way I would love to know. I'm just learning matplotlib (I'm a former matlab user) and would love to master it. -- David GrantPlease Note my new email address: [EMAIL PROTECTED] - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] IndexFormatter missing
> "David" == David Grant <[EMAIL PROTECTED]> writes: David> edges=[54, 76, 80, 100] stats=[5.423, 23.226, 4.1, 6.93] xticks(edges) perhaps? Or maybe I still don't understand. A complete script might help... JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] IndexFormatter missing
> "John" == John Hunter <[EMAIL PROTECTED]> writes: > "David" == David Grant <[EMAIL PROTECTED]> writes: David> edges=[54, 76, 80, 100] stats=[5.423, 23.226, 4.1, 6.93] John> xticks(edges) Sorry, what I meant was something like xticks(range(len(edges)), ['%d'%edge for edge in edges]) This will set the locations to the integers and the labels to your edge labels. JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Using pylab interface with Agg backend?
Hi guys, Is this possible? Specifically I'm trying implement something close to this example: http://matplotlib.sourceforge.net/examples/webapp_demo.py But would like to be able to utilize code found in samples like this: http://matplotlib.sourceforge.net/screenshots/pie_demo.py Much thanks! -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Using pylab interface with Agg backend?
> "Gregory" == Gregory Piñero <[EMAIL PROTECTED]> writes: Gregory> Hi guys, Is this possible? Specifically I'm trying Gregory> implement something close to this example: Gregory> http://matplotlib.sourceforge.net/examples/webapp_demo.py Gregory> But would like to be able to utilize code found in Gregory> samples like this: Gregory> http://matplotlib.sourceforge.net/screenshots/pie_demo.py You just have to tell matplotlib to use Agg as your backend -- pylab will respect the default backend, whether it is a GUI, Agg or PS. There are several ways to choose the backend * make it permanent by setting your backend to 'Agg' in matplotlibrc * change it on a per script basis exterally by launching with the -d option > python myscript.py -dAgg > python myscript.py -dPS > python myscript.py -dGTKAgg * probably best for a web app, use the matplotlib "use directive". This must be done *before* importing pylab import matplotlib matplotlib.use('Agg') import pylab plot and save This is discussed at http://matplotlib.sf.net/backends.html JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Using pylab interface with Agg backend?
So my only remaining point of confusion is why wasn't the pylab interface used in the demo here: > Gregory> http://matplotlib.sourceforge.net/examples/webapp_demo.py Is it just a style choice? - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Using pylab interface with Agg backend?
> "Gregory" == Gregory Piñero <[EMAIL PROTECTED]> writes: Gregory> So my only remaining point of confusion is why wasn't the Gregory> pylab interface used in the demo here: Gregory> http://matplotlib.sourceforge.net/examples/webapp_demo.py Gregory> Is it just a style choice? pylab manages figures for you -- you want to be sure in an application that creates many figures and saves them to images (like a web app) that every figure that is created is closed fig = figure(1) ...later close(1) In a production app like a web application server generating graphics, often times you don't want any magic going on behind the hood, and pylab's stateful management of figures, the current figure, and the current axes grates on some people who like to have full control over object creation and destruction. So the webapp demo shows how to use the API to manage and use figures. It is mainly a style choice. JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] IndexFormatter missing
> "David" == David Grant <[EMAIL PROTECTED]> writes: David> Cool, yeah I think that will work just fine. I don't think David> I saw xticks in the matplotlib PDF document I was looking David> at. What's the best source of documentation? help(pylab) JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] IndexFormatter missing
On 7/12/06, John Hunter <[EMAIL PROTECTED]> wrote: > "John" == John Hunter <[EMAIL PROTECTED]> writes:> "David" == David Grant < [EMAIL PROTECTED]> writes:David> edges=[54, 76, 80, 100] stats=[5.423, 23.226, 4.1, 6.93]John> xticks(edges)Sorry, what I meant was something like xticks(range(len(edges)), ['%d'%edge for edge in edges]) This will set the locations to the integers and the labels to youredge labels.Cool, yeah I think that will work just fine. I don't think I saw xticks in the matplotlib PDF document I was looking at. What's the best source of documentation? I just noticed it is here: http://matplotlib.sourceforge.net/pylab_commands.html which is where I looked originally... I guess I just didn't know what to look for. :-)p.s. any idea why [matplotlib-users] didn't show up in the subject line of my post? -- David GrantPlease Note my new email address: [EMAIL PROTECTED] - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Using pylab interface with Agg backend?
On 7/12/06, John Hunter <[EMAIL PROTECTED]> wrote: > In a production app like a web application server generating graphics, > often times you don't want any magic going on behind the hood, and > pylab's stateful management of figures, the current figure, and the > current axes grates on some people who like to have full control over > object creation and destruction. > > So the webapp demo shows how to use the API to manage and use > figures. It is mainly a style choice. Thanks, I'm starting to understand. So since I am making a web app, I should be refering to the API reference instead of the screenshots code: http://matplotlib.sourceforge.net/screenshots.html If correct here, I guess I locate the API in the user guide? Is there anything else I should be using as a reference? -Greg - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Using pylab interface with Agg backend?
> "Gregory" == Gregory Piñero <[EMAIL PROTECTED]> writes: Gregory> If correct here, I guess I locate the API in the user Gregory> guide? Is there anything else I should be using as a Gregory> reference? http://matplotlib.sourceforge.net/faq.html#OO http://matplotlib.sourceforge.net/leftwich_tut.txt JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] 2D Intensity Plots of Titan
I am trying to map the surface of Saturn's largest moon, Titan for a summer research project. As a rough draft, I would like to plot the temperature (colored red) at the longitude(x) and latitude(y) coordinates. My data file is tab delimited in three columns (x,y,T). I am also missing some x,y locations, which I would like to leave blank. As a final report, I would like the data point to be able to take on different geometries (circle, hexagon, arbitrary shape, etc) and different sizes as well as be able to overlap with neighboring data points. Finally, I would like to be able to plot this not on a rectangular cartesion coordinate system, but on a planetographic (global projection) coordinate system. I've spent two days trying everything from gnuplot, matlab, matplotlib and others trying to do this, but to no avail. Any suggestions would be very welcomed. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] embedded python and matplotlib
I am a newbie to python, numpy, and matplotlib, and I like what I have seen so far. I have been wishing for a long time there was an open alternative to matlab, and when I heard about numpy and matplotlib, I tried them out immediately. Anyway, I am running python embedded in a C++ WX app. I just discovered matplotlib, so I tried it out. From the interactive python shell (vanilla FC5 linux install of python and matplotlib) everything works fine. The show() command blocks. In my application, I use the PyRun_SimpleFile command to execute user selected python files on a separate thread. That has seemed to work fine for several weeks on scripts using numpy and such. When I use matplotlib, however, the show() command does not block, and then strange things happen when I try to close the Figure window. On the first close it reopens the window right back up. On the second close attempt it closes (gdb splits out zombie thread messages), and then if I try to execute another script with a show() command in it it sometimes seg faults, sometimes works, but in general causes my program to behave strangely. So my question is: what is the correct way to setup python and/or matplotlib when running python embedded? Is there a way to make show() blocking when using embedded python (I am not sure this will solve any problems). Thanks, Lane Brooks - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] passing 1D or 2D arrays to contour, pcolor, image, plot
I am following up on the discussion of passing a single 2D array to plot.Wouldn't it make more sense that, in Python array style, if you give it a single N x K argument you plot rows against the first row? On the same token, it would be really nice if contour, pcolor and imagetake as an x and y argument not only a matrix but just a 1D row. Thisshould be really easy and would be very useful.In fact, if more people want it I can submit a patch for the latter one, Mark --Message: 4Date: Wed, 12 Jul 2006 14:38:46 -0400 From: Alan G Isaac <[EMAIL PROTECTED]>Subject: Re: [Matplotlib-users] ANN: matplotlib-0.87.4 (bugfix releasefor enthon)To: matplotlib-users@lists.sourceforge.netMessage-ID: <[EMAIL PROTECTED]>Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1 On Wed, 12 Jul 2006, Eric Firing apparently wrote:> In the single-argument NxK case, I think matlab plots> subsequent columns against the first column. Is this what> you would like?Yes. Cheers,Alan Isaac - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] passing 1D or 2D arrays to contour, pcolor, image, plot
On Wednesday 12 July 2006 16:16, Mark Bakker wrote: > I am following up on the discussion of passing a single 2D array to plot. > Wouldn't it make more sense that, in Python array style, > if you give it a single N x K argument you plot rows against the first row? That's not the behavior I would have expected. I would have expected each row to be plotted as a funtion of the column index, just like plot([1,2,3,4]) is done now, but with each row in a different color. I would like plot([1,2,3,4], array([[1,2,3,4],[2,3,4,5]])) to plot two lines as a function of the single x-list, and I would like plot(array([[1,2,3,4],[2,3,4,5]]), array([[1,2,3,4],[2,3,4,5]])) to take the next obvious step. I *think* matlab does this, but its been so long since I used it... Darren - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 3 questions about tick labels for large values
On Wednesday 12 July 2006 09:49, Darren Dale wrote: > Hello, um..., P., > > On Wednesday 12 July 2006 03:43, PGM wrote: > > Folks, > > I need your wisdom about ticks labels on ordinates for large numbers > > (>1e4). The default behavior I have (0.87.4) is to display tick labels as > > "%.1f", and write a string "x1e+..." above the top left corner of the > > current axes. > > > > - When using "yaxis.tick_right()", the "x1e..." string stays above the > > top left corner. That becomes an issue when using two different scales. > > How could I force the 'mantissa' string to be on the same side as the > > axis it depends on ? > > I'll take care of this, but I will need a few days. As of svn 2560, the label will render over the left or right y-axis depending on the position of the ticks. Darren - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] passing 1D or 2D arrays to contour, pcolor, image, plot
Mark Bakker wrote: > > On the same token, it would be really nice if contour, pcolor and image > take as an x and y argument not only a matrix but just a 1D row. This > should be really easy and would be very useful. contour already does this, and I agree that pcolor and pcolormesh should. pcolor* is a little more complicated than contour because the X and Y dimensions are ideally larger by 1 than the corresponding Z dimensions, but don't have to be. image does not take x,y arguments at all, by design. > > In fact, if more people want it I can submit a patch for the latter one, OK. I suggest a function that can be used for both pcolor and pcolormesh. (Some day the two should be consolidated, but there is a pcolormesh bug with alpha != 1, so we can't do it yet.) Eric - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 2D Intensity Plots of Titan
matplotlib+basemap may do it for you. I'm not sure how much of it's hard coded for the Earth though... http://www.scipy.org/Cookbook/Matplotlib/Maps At 08:49 AM 7/12/2006, Jeff Sadino wrote: >I am trying to map the surface of Saturn's largest moon, Titan for a >summer research project. As a rough draft, I would like to plot the >temperature (colored red) at the longitude(x) and latitude(y) >coordinates. My data file is tab delimited in three columns (x,y,T). I >am also missing some x,y locations, which I would like to leave blank. > >As a final report, I would like the data point to be able to take on >different geometries (circle, hexagon, arbitrary shape, etc) and different >sizes as well as be able to overlap with neighboring data >points. Finally, I would like to be able to plot this not on a >rectangular cartesion coordinate system, but on a planetographic (global >projection) coordinate system. > >I've spent two days trying everything from gnuplot, matlab, matplotlib and >others trying to do this, but to no avail. Any suggestions would be very >welcomed. > > > >- >Using Tomcat but need to do more? Need to support web services, security? >Get stuff done quickly with pre-integrated technology to make your job easier >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >___ >Matplotlib-users mailing list >Matplotlib-users@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/matplotlib-users Ted Drain Jet Propulsion Laboratory [EMAIL PROTECTED] - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] plot command: more flexible argument handling
Darren Dale wrote: > On Wednesday 12 July 2006 16:16, Mark Bakker wrote: > >>I am following up on the discussion of passing a single 2D array to plot. >>Wouldn't it make more sense that, in Python array style, >>if you give it a single N x K argument you plot rows against the first row? > > > That's not the behavior I would have expected. I would have expected each row > to be plotted as a funtion of the column index, just like plot([1,2,3,4]) is > done now, but with each row in a different color. I would like > plot([1,2,3,4], array([[1,2,3,4],[2,3,4,5]])) to plot two lines as a function > of the single x-list, and I would like plot(array([[1,2,3,4],[2,3,4,5]]), > array([[1,2,3,4],[2,3,4,5]])) to take the next obvious step. I *think* matlab > does this, but its been so long since I used it... I was afraid someone would bring up these possibilities... One of the problems with fancy argument handling is that there are many ways it can be done, so we have to decide on the behavior we want; and inevitably this will surprise (and probably irritate) some people just as it pleases others. (Other problems include complex code, complex documentation, and runtime overhead. For interactive use, however, fancy argument handling may be worth the trouble.) We are going to have some tradeoffs among matlab compatibility, internal consistency, and adherence to the underlying data storage model. Here is what Matlab does (and in one respect it is not what I thought I remembered): 1) Given a single NxK matrix, it plots each column against the row index. 2) Given a vector and an NxK, it plots each column against the vector. 3) Given an NxK and a vector, it plots the vector against each column. 4) Given an NxK and an NxK it plots each column from the second against the corresponding column of the first. I think this is a good model: fairly simple, consistent, intuitive, and covers a good range of real-life situations. It differs from what I thought I remembered, and from what I think Stefan requested, in that, given an Nx2, it does not plot the second column against the first. That behavior, however, does not generalize nicely to NxK for any K!=2, so I now think we should choose either one or the other. A virtue of Stefan's Nx2 proposal is that it is consistent with the changes I made to elsewhere so that paths can be specified as Nx2 arrays; this, in turn, was consistent with the original specification as sequences of (x,y) tuples. But plot has never used sequences of (x,y) tuples, so the argument for the Nx2 form is weaker here. I don't know whether the reason Matlab chooses the columns as the data vectors is because of the Fortran storage order Matlab uses, or whether there is some other reason. Personally I am very comfortable with it, perhaps simply because of my Matlab experience. I think part of it is that columns in a table seem more natural as data vectors than rows, however; tables are usually oriented so that columns (fields) are different variables, and the row index is the sample number, or time, or a spatial coordinate. To summarize, the options seem to be: 1) Leave plot argument parsing alone. 2) Accept an Nx2 array in place of a pair of arguments containing x and y. 3) Implement the Matlab model. 4) Implement the Matlab model, but taking rows instead of columns in an X or Y array that is 2-D. I am open to arguments, but my preference is the Matlab model. I don't think that the difference in native array storage order matters much. It is more important to have the API at the plot method and function level match the way people think. Eric - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] embedded python and matplotlib
Hi Lane, I don't have any answers for you here, but I do wonder if you might gains some insight on this by looking at the way IPython handles its '-pylab' and '-gthread' etc flags? Cheers JP Lane Brooks wrote: >So my question is: what is the correct way to setup python and/or >matplotlib when running python embedded? Is there a way to make show() >blocking when using embedded python (I am not sure this will solve any >problems). > >Thanks, >Lane Brooks > > - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] embedded python and matplotlib
I found that using any of the non-GTK backends--like QTAgg or WXAgg--caused show() to block and at stopped the thread issues. I am not sure the implications of this, but it works for now. So I am content at least for the moment. Thanks, Lane John Pye wrote: > Hi Lane, > > I don't have any answers for you here, but I do wonder if you might > gains some insight on this by looking at the way IPython handles its > '-pylab' and '-gthread' etc flags? > > Cheers > JP > > Lane Brooks wrote: > >> So my question is: what is the correct way to setup python and/or >> matplotlib when running python embedded? Is there a way to make show() >> blocking when using embedded python (I am not sure this will solve any >> problems). >> >> Thanks, >> Lane Brooks >> >> - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plot command: more flexible argument handling
On Wednesday 12 July 2006 7:19 pm, you wrote: > Darren Dale wrote: > > On Wednesday 12 July 2006 16:16, Mark Bakker wrote: > >>I am following up on the discussion of passing a single 2D array to plot. > >>Wouldn't it make more sense that, in Python array style, > >>if you give it a single N x K argument you plot rows against the first > >> row? > > > > That's not the behavior I would have expected. I would have expected each > > row to be plotted as a funtion of the column index, just like > > plot([1,2,3,4]) is done now, but with each row in a different color. I > > would like > > plot([1,2,3,4], array([[1,2,3,4],[2,3,4,5]])) to plot two lines as a > > function of the single x-list, and I would like > > plot(array([[1,2,3,4],[2,3,4,5]]), array([[1,2,3,4],[2,3,4,5]])) to take > > the next obvious step. I *think* matlab does this, but its been so long > > since I used it... > > I was afraid someone would bring up these possibilities... Let me temper what I said. *If* a change was considered, what I described seems to be the most intuitive behavior. > We are going to have some tradeoffs among matlab compatibility, internal > consistency, and adherence to the underlying data storage model. agreed > Here is what Matlab does (and in one respect it is not what I thought I > remembered): > > 1) Given a single NxK matrix, it plots each column against the row index. > > 2) Given a vector and an NxK, it plots each column against the vector. > > 3) Given an NxK and a vector, it plots the vector against each column. > > 4) Given an NxK and an NxK it plots each column from the second against > the corresponding column of the first. > > I think this is a good model: fairly simple, consistent, intuitive, and > covers a good range of real-life situations. It differs from what I > thought I remembered, and from what I think Stefan requested, in that, > given an Nx2, it does not plot the second column against the first. > That behavior, however, does not generalize nicely to NxK for any K!=2, > so I now think we should choose either one or the other. A virtue of > Stefan's Nx2 proposal is that it is consistent with the changes I made > to elsewhere so that paths can be specified as Nx2 arrays; this, in > turn, was consistent with the original specification as sequences of > (x,y) tuples. But plot has never used sequences of (x,y) tuples, so the > argument for the Nx2 form is weaker here. > > I don't know whether the reason Matlab chooses the columns as the data > vectors is because of the Fortran storage order Matlab uses, or whether > there is some other reason. I believe this is the reason. > Personally I am very comfortable with it, > perhaps simply because of my Matlab experience. I think part of it is > that columns in a table seem more natural as data vectors than rows, > however; tables are usually oriented so that columns (fields) are > different variables, and the row index is the sample number, or time, or > a spatial coordinate. > > To summarize, the options seem to be: > > 1) Leave plot argument parsing alone. > 2) Accept an Nx2 array in place of a pair of arguments containing x and y. > > 3) Implement the Matlab model. > 4) Implement the Matlab model, but taking rows instead of columns in an > X or Y array that is 2-D. > > I am open to arguments, but my preference is the Matlab model. I don't > think that the difference in native array storage order matters much. > It is more important to have the API at the plot method and function > level match the way people think. I would probably use 4, but not 3. I don't like the sound of 2. But that's just my opinion. Darren - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 3 questions about tick labels for large values
Darren, > As of svn 2560, the label will render over the left or right y-axis > depending on the position of the ticks. Sweet ! Thanks a lot ! And following your advice, I came up with the following solution to my problem (forcing the mantissa to multiple of 3, with a given number of decimals). Should I post it on the wiki ? Cheers, and thx again Pierre #-- class EngrFormatter(ScalarFormatter): """A variation of the standard ScalarFormatter, using only multiples of three in the mantissa. A fixed number of decimals can be displayed with the optional parameter `ndec` . If `ndec` is None (default), the number of decimals is defined from the current ticks. """ def __init__(self, ndec=None, useOffset=True, useMathText=False): ScalarFormatter.__init__(self, useOffset, useMathText) if ndec is None or ndec < 0: self.format = None elif ndec == 0: self.format = "%d" else: self.format = "%%1.%if" % ndec def _set_orderOfMagnitude(self,range): ScalarFormatter._set_orderOfMagnitude(self,range) self.orderOfMagnitude = 3*(self.orderOfMagnitude//3) def _set_format(self): # set the format string to format all the ticklabels locs = (array(self.locs)-self.offset) / 10**self.orderOfMagnitude+1e-15 sigfigs = [len(str('%1.3f'% loc).split('.')[1].rstrip('0')) \ for loc in locs] sigfigs.sort() if self.format is None: self.format = '%1.' + str(sigfigs[-1]) + 'f' if self._usetex or self._useMathText: self.format = '$%s$'%self.format - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Legend: Space between text and upper border
Hello, I'm having a problem with the legend in matplotlib. Sometimes the upper border of the legend goes throug the first line of text in the legend. Is there any chance to control the space between the text and the upper border to avoid this? -- Till Wagner ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Legend: Space between text and upper border
On Wednesday 12 July 2006 10:12 pm, Till Wagner wrote: > Hello, > > I'm having a problem with the legend in matplotlib. > Sometimes the upper border of the legend goes throug > the first line of text in the legend. Is there any > chance to control the space between the text and the > upper border to avoid this? You can set legend.pad in your rc settings, or you can change the legend's pad property either when you create it or after the fact l=legend(['ok'], pad=0.5) l.pad=1.5 draw() Would you post an example that exposes the problem? Darren - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ANN: matplotlib-0.87.4 (bugfix release for enthon)
Stefan van der Walt wrote: > On Tue, Jul 11, 2006 at 10:53:59PM -0400, Charlie Moad wrote: > >>2006-06-22 Added support for numerix 2-D arrays as alternatives to >> a sequence of (x,y) tuples for specifying paths in >> collections, quiver, contour, pcolor, transforms. >> Fixed contour bug involving setting limits for >> color mapping. Added numpy-style all() to numerix. - EF > > > It would be useful to have plot accept a 2-D array as well. Would > patches for this be considered, or is there some reason why this can't > work? At the moment, doing > > P.plot(z) where z is Nx2, > > raises > > RuntimeError: xdata and ydata must be the same length > > So it doesn't look as though this functionality will override any > current feature. Stefan, To reply more directly to your proposal now that I have thought about it more: although I see the logic in it, I don't see much gain from your Nx2 idea; it not very hard to simply write P.plot(z[:,0], z[:,1]). Furthermore, implementing your idea would not conflict with present behavior, but it would interfere with an alternative version of fancy argument handling that I think would be much more generally useful. Eric - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Getting error TypeError: unsupported operand type(s) for /: 'BinOp' and 'BinOp'
Matplotlib version: '0.87.2' I'm getting the following error: TypeError: unsupported operand type(s) for /: 'BinOp' and 'BinOp' On the following line in finance.py sy = (ax.bbox.ur().y() - ax.bbox.ll().y()) / (ax.viewLim.ur().y() - ax.viewLim.ll().y()) Is this a know issue? Am I doing something wrong? Vineet - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users