Re: [Matplotlib-users] problem using subplots with ion()

2009-07-17 Thread Jae-Joon Lee
On Wed, Jul 15, 2009 at 3:23 PM, Louise Loudermilklouise.louderm...@gmail.com wrote: Hi.  I am trying to output multiple 2D graphs (subplots) in one figure (using pylab) for each time-step that the python code runs - basically an interactive graphs.  We use the 'ion()' and 'imshow()' functions

Re: [Matplotlib-users] Problems with autofmt_xdate()

2009-07-17 Thread Jae-Joon Lee
Please post a simple, standalone script that reproduces your problem, so that we can track down what is causing the problem. I don't think there has been any report of a similar issue (but not sure). As far as I know, autofmt_xdata only adjusts the alignment and rotation of the ticklabels and does

Re: [Matplotlib-users] Annotation on an axis

2009-07-17 Thread Jae-Joon Lee
Drawing box around a text is quite easy. http://matplotlib.sourceforge.net/examples/pylab_examples/fancytextbox_demo.html To place a text in a way like ticklabels, you need to use blended transform. The short example may give you some starting point. -JJ from matplotlib.transforms import

Re: [Matplotlib-users] Russian labels without LaTeX

2009-07-17 Thread Jae-Joon Lee
I'm not an expert on this issue, and I never used Russian language. But here is my experience with unicode in matplotlib. Matplotlib's own font rendering engine (based on truetype) does support unicode rendering. But I don't think there is any support for things like a fontset. And, as far as

Re: [Matplotlib-users] dynamically add subplots to figure

2009-07-16 Thread Jae-Joon Lee
One work around is to call self.figure.subplots_adjust() after geometry changed. After this call, the twinx-ed axes will have the same axes position as the original one. Another option is to use mpl_toolkits.axes_grid

Re: [Matplotlib-users] The vertical part of y error bars. Where are they?

2009-07-15 Thread Jae-Joon Lee
http://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=errorbar#matplotlib.pyplot.errorbar As described in the doc, the errorbar command creates lines and line collections, where the errorbars are created as line collections. Axes.collections contains the list of collection artist that

Re: [Matplotlib-users] plot a line with an arrow

2009-07-15 Thread Jae-Joon Lee
Check the gallery where a few example shows you how to draw arrows. My recommendation is to use annotate with empty string. e.g., annotate(, (1,2), xytext=(5,2), arrowprops=dict(fc=b)) http://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=annotate#matplotlib.pyplot.annotate However,

Re: [Matplotlib-users] Creating new type of plot

2009-07-15 Thread Jae-Joon Lee
On Mon, Jul 13, 2009 at 4:56 PM, Uri Lasersonlaser...@mit.edu wrote: Hi everyone, I am trying to create some brand new types of plots for a unique data set that I have.  My question basically boils down to getting some advice on what is the proper way to set up a function that will act like

Re: [Matplotlib-users] matplotlib breaks: ValueError: ordinal must be = 1 from matplotlib/dates.py, line 170, in _from_ordinalf

2009-07-14 Thread Jae-Joon Lee
Please post a standalone example that reproduces your problem. I tried your example with some junk data but no such exception is raised. However, there has been a report of a similar ordinal value problem which I think is not fixed yet, but that problem only occurs when two and more axes are

Re: [Matplotlib-users] problems with numpoints in legend

2009-07-11 Thread Jae-Joon Lee
The number of points in scatter plot has other keyword argument (scatterpoints). This is true for svn version, but I'm not quite sure if it is also true for 0.98.5.2. Anyhow, the documentation still needs to be updated. Regards, -JJ On Sat, Jul 11, 2009 at 9:46 AM, John Hunterjdh2...@gmail.com

Re: [Matplotlib-users] {axesgrid} - How to change fontsize on multiple labels?

2009-07-09 Thread Jae-Joon Lee
On Thu, Jul 9, 2009 at 12:40 AM, Gökhan SEVERgokhanse...@gmail.com wrote: I have one tiny question left working on these figures; that is: how to make mathtext font and a regular label font at the same size? For instance: host.set_ylabel(rDMT CCN Concentration [ #/$cm^3$]) but as it is

Re: [Matplotlib-users] zoomed in detail box

2009-07-09 Thread Jae-Joon Lee
On Thu, Jul 9, 2009 at 7:24 AM, Robinrobi...@gmail.com wrote: On Wed, Jul 8, 2009 at 10:57 PM, Jae-Joon Leelee.j.j...@gmail.com wrote: If you use the svn version of matplotlib, you  may use axes_grid toolkit.

Re: [Matplotlib-users] {axesgrid} - How to change fontsize on multiple labels?

2009-07-08 Thread Jae-Joon Lee
axes_grid toolkit uses slightly customized version of axes and different kind of artists are used to draw ticks and ticklabels, and some of the commands from original mpl do not work. But not changing fontsize and not showing up gridlines are things that should be fixed (I'll work on these in a

Re: [Matplotlib-users] Highlighting the axes of coordinates

2009-07-03 Thread Jae-Joon Lee
Changing the properties of the individual grid line can be tricky. The easier way in my opinion is to draw another line with thinker linewidth. ax=subplot(111) ax.grid() from matplotlib.transforms import blended_transform_factory # for x=0 trans = blended_transform_factory(ax.transData,

Re: [Matplotlib-users] contourf: black lines connecting contour levels?

2009-07-03 Thread Jae-Joon Lee
I'm using Mac OS 10.5.7, Python 2.6.2, and MPL 0.98.5.3. I don't know which bug in the thread you were referring to. I tried the for c in CS.collections: c.set_edgecolor(none) fix, but it didn't have any effect. On Thu, Jul 2, 2009 at 4:49 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote

Re: [Matplotlib-users] Ordinal must be = 1 with SuplotHost and dates

2009-07-02 Thread Jae-Joon Lee
I can reproduce the error with the svn version. It seems that the problem is not SubplotHost specific, i.e., you have same problem if you use mpl's original axes with twinx. I think it has something to do with the axes sharing in general. Preventing autoscale of xaxis suppress the error.

Re: [Matplotlib-users] contourf: black lines connecting contour levels?

2009-07-02 Thread Jae-Joon Lee
The dropbox link is broken (you need a public url). What version of mpl and what backend are you using? There was a similar problem which has now been fixed. Try the work-around described in the thread below, and see if works. http://www.nabble.com/problems-with-contourf---alpha-td22553269.html

Re: [Matplotlib-users] log scale the Y axis of a stem plot

2009-07-01 Thread Jae-Joon Lee
yscale(log) http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.yscale However the bars in the stem plot will be gone (because of the log 0). It seems that there is no option for controling the baseline location in the stem command. However, the code for stem command is

Re: [Matplotlib-users] to much points

2009-07-01 Thread Jae-Joon Lee
A snippet of code does not help much. Please try to post a small concise standalone example that we can run and test. A general advise is to try to reduce the number of plot call, i.e., plot as may points as possible with a single plot call. However, 50million points seems to be awful a lot. 6

Re: [Matplotlib-users] to much points

2009-07-01 Thread Jae-Joon Lee
(). The segfault happens in the _path_module::affine_transform method of src/_path.cpp. I wonder if you can reproduce this. -JJ Mike On 07/01/2009 01:34 PM, Jae-Joon Lee wrote: A snippet of code does not help much. Please try to post a small concise standalone example that we can run

Re: [Matplotlib-users] to much points

2009-07-01 Thread Jae-Joon Lee
/2009 01:34 PM, Jae-Joon Lee wrote: A snippet  of code does not help much. Please try to post a small concise standalone example that we can run and test. A general advise is to try to reduce the number of plot call, i.e., plot as may points as possible with a single plot call. However

Re: [Matplotlib-users] subplots with no space between limited to 6x6?

2009-06-29 Thread Jae-Joon Lee
Yes, I can reproduce this with the current svn. I think what's happening is that, with larger number of grid, there is slight overlapping between each subplots (likely due to the floating point error). Note that subplot command deletes existing axes if they overlap with the new one. There would

Re: [Matplotlib-users] Zooming plot and transforms...

2009-06-29 Thread Jae-Joon Lee
I think the issue here is to connect points in two different axes, which is possible but can be a bit difficult. In the svn version of matplotlib, there are some helper classes to ease this job a bit. I'm attaching the example. I think you can also run the example with 0.98.5.3. Just download

Re: [Matplotlib-users] Stopping Legend From Overlapping the Graph

2009-06-27 Thread Jae-Joon Lee
sorry. As guillaume has mentioned, you need to install mpl from svn. Here is some workaround you can try. I guess it would work with 0.98.5.3. Basically, you create a separate axes for a legend. ax1 = axes([0.1, 0.2,0.8, 0.7]) p1, = ax1.plot([1,2,3]) p2, = ax1.plot([3,2,1]) ax2 = axes([0.1,

Re: [Matplotlib-users] Histogram with multiple data

2009-06-26 Thread Jae-Joon Lee
I guess you're providing an input data with a wrong shape. aa = np.transpose([listA, listB, listC]) plt.hist(aa, bins=4, histtype='bar', alpha=0.75,rwidth=0.85,label=['A','B','C']) Regards, -JJ On Thu, Jun 25, 2009 at 1:37 AM, Uma Suma.sunde...@gmail.com wrote: Hi, I have the same

Re: [Matplotlib-users] Stopping Legend From Overlapping the Graph

2009-06-25 Thread Jae-Joon Lee
The linked page below shows how you put the legend above the graph. http://matplotlib.sourceforge.net/users/plotting/legend.html#legend-location You can put it below the axes by adjusting the bbox_to_anchor parameter. Try something like bbox_to_anchor=(0., -0.1, 1., -0.1), loc=1 Make sure to

Re: [Matplotlib-users] equivalent of PlotFilling-Axis

2009-06-24 Thread Jae-Joon Lee
I guess the stem plot is close to what you need. http://matplotlib.sourceforge.net/examples/pylab_examples/stem_plot.html Regards, -JJ On Wed, Jun 24, 2009 at 3:32 PM, Artgrenan...@gmail.com wrote: Hi Eric, I was thinking more like the tiny attachment (hope attachments are ok).

Re: [Matplotlib-users] Help with transforms of collections

2009-06-22 Thread Jae-Joon Lee
Tony, My understanding is that (which might be wrong) drawing collections involves (at least) 2 transforms. The first transform is (mostly) for scaling, and the second transform is for offset. And this seems to be true for PolygonCollection (which scatter creates) as far as I can see.

Re: [Matplotlib-users] Adding grid to animation with blit

2009-06-22 Thread Jae-Joon Lee
Without actual code, it is difficult to figure out what the real problem is. Anyhow, did you check the below animation example? http://matplotlib.sourceforge.net/examples/animation/animation_blit_gtk.html In the example, the grid is static (i.e., not animated). If what you want is to have the

Re: [Matplotlib-users] possible bug with scatter

2009-06-21 Thread Jae-Joon Lee
Thanks for the report. And, this turned out to be a bug. The symbol style code was simply ignored when its value is 3. While the bug should now be fixed (both in the trunk and the maint. branch), you may use marker style like (20,0,0) (or increase the first number when symbol is large) for a

Re: [Matplotlib-users] possible bug with scatter

2009-06-21 Thread Jae-Joon Lee
of each item is different there. The last item is the symbol style, unlike the input parameter for scatter where the second one is the symbol style. For example, 's' : (4,math.pi/4.0,0), # square Regards, -JJ Thanks, Tom On Jun 21, 2009, at 2:59 PM, Jae-Joon Lee wrote: Thanks

Re: [Matplotlib-users] X axis layout differences between matplotlib 0.98.5.2 and 0.98.3

2009-06-19 Thread Jae-Joon Lee
Hi, You can try to manually adjust x-limits. plt.xlim(dateList[0], dateList[-1]) However, manual adjustments will become a bit more difficult as your plot gets more complex. Well, I think the best way is to install a newer version of mpl on your ubuntu 8.10 if possible. -JJ On Thu, Jun 18,

Re: [Matplotlib-users] autocrop function

2009-06-10 Thread Jae-Joon Lee
If you're using very recent version of mpl, you may try savefig with bbox_inches option. savefig(a.png, bbox_inches=tight) The algorithm is not perfect, but will work for most of simple plots. Regards, -JJ On Tue, Jun 9, 2009 at 1:22 PM, Nils Wagnernwag...@iam.uni-stuttgart.de wrote: Hi

Re: [Matplotlib-users] autocrop function

2009-06-10 Thread Jae-Joon Lee
: On Wed, 10 Jun 2009 02:26:54 -0400  Jae-Joon Lee lee.j.j...@gmail.com wrote: If you're using very recent version of mpl, you may try savefig with bbox_inches option. savefig(a.png, bbox_inches=tight) The algorithm is not perfect, but will work for most of simple plots. Regards, -JJ  Hm

Re: [Matplotlib-users] one data set, two y axis scales

2009-06-05 Thread Jae-Joon Lee
John, These ideas have been part of motivation behind my axes_grid toolkit. In the module documentation of lib/mpl_toolkits/axes_grid/axislines.py, I tried to briefly explain what I wanted and what I implemented, although the explanation is very far from complete (also some examples are found in

Re: [Matplotlib-users] one data set, two y axis scales

2009-06-04 Thread Jae-Joon Lee
I hope the code below gives you some idea. def Tc(Tf): return (5./9.)*(Tf-32) ax1 = subplot(111) # y-axis in F ax2 = twinx() # y-axis in C def update_ax2(ax1): y1, y2 = ax1.get_ylim() ax2.set_ylim(Tc(y1), Tc(y2)) # automatically update ylim of ax2 when ylim of ax1 changes.

Re: [Matplotlib-users] making publication quality plots

2009-06-03 Thread Jae-Joon Lee
On Wed, Jun 3, 2009 at 2:11 AM, Paul Anton Letnes paul.anton.let...@gmail.com wrote: Is this complete enough? If you do the plot, you'll see that the plot Unfortunately not. It is best if you post a stand-alone script that we can simply run with copy-and-paste. is about one column wide (7

Re: [Matplotlib-users] Not able to write eps file ...

2009-05-18 Thread Jae-Joon Lee
Try to replace '1.0' with 1.0 for mew. Regards, -JJ On Mon, May 18, 2009 at 11:47 AM, Chaitanya Krishna icym...@gmail.com wrote: Hi all, I guess I am doing something silly, but it is not obvious. Guess one of you can help!! I am using NumPy 1.3.0 and matplotlib 0.98.5.2 I am using the

Re: [Matplotlib-users] Annotations with pan / zoom

2009-05-18 Thread Jae-Joon Lee
Sure, I'll keep that in mind. I'll revise the patch (I'll also think about the contains method) and submit it soon. Thanks, -JJ The patch is now committed to svn with relevant changes (r7119). -JJ -- Crystal

Re: [Matplotlib-users] polar plot: problem with negative angles

2009-05-18 Thread Jae-Joon Lee
The grid line will reappear if you set high enough resolution. plt.subplot(111, polar=True, resolution=100) This should be filed as a bug, though. I guess the current default for resolution is 1. I think this was to enable to draw a straight line in polar projection. However, my guess is that it

Re: [Matplotlib-users] subplot

2009-05-17 Thread Jae-Joon Lee
Hi all, I had a few off-list conversation with Alan, and I'm also quite agree with him for this issue. Just to rephrase, I think the current subplot interface has (at least) two issues. issue 1) the indexing convention is not that of python. The index starts from 1, instead of 0. (eg 111)

Re: [Matplotlib-users] Question about imshow

2009-05-17 Thread Jae-Joon Lee
I think the point here is that        img = Image('foo.png')        imshow(img) and        img = Image('foo.png')        imshow(asarray(img)) give different results, since matplotlib.image.pil_to_array functions differently from what PIL exposes in __array_interface__ -- Pauli

Re: [Matplotlib-users] subplot

2009-05-17 Thread Jae-Joon Lee
On Sun, May 17, 2009 at 5:03 PM, Alan G Isaac alan.is...@gmail.com wrote: So I am suggesting that any new functions certainly should not propagate this anomaly. Understood. And, yes, I guess you're quite right in this regard. And I'll try to deprecate the current matlab-like interface in future

Re: [Matplotlib-users] subplot

2009-05-16 Thread Jae-Joon Lee
On Fri, May 15, 2009 at 10:10 PM, John Hunter jdh2...@gmail.com wrote: FYI, several weeks ago I updated the official site-docs after you contributes the axes grid toolkit and docs:  http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#rgb-axes Thanks a lot, John.

Re: [Matplotlib-users] Annotations with pan / zoom

2009-05-16 Thread Jae-Joon Lee
On Fri, May 15, 2009 at 10:02 PM, John Hunter jdh2...@gmail.com wrote: When you are extending/fixing existing code and come across methods with no docs, could you write a one or two line doc string for them? I wrote many of these and at the time they were so obvious that they didn't need

Re: [Matplotlib-users] Question about imshow

2009-05-16 Thread Jae-Joon Lee
On Sat, May 16, 2009 at 6:58 PM, jorgesmbox...@yahoo.es wrote: Hi, I want to read images and do some processing with them. While learning how to do this, i.e. opening images, displaying them, transforming them tu numpy arrays, etc., I came across a strange behaviour. If I open an image and

Re: [Matplotlib-users] how to create a barh chart, right to left

2009-05-15 Thread Jae-Joon Lee
On Fri, May 15, 2009 at 10:59 AM, kevin gill kevin.g...@openapp.ie wrote: How do I make the left chart display right to left instead of the default left to right? adjust your xlim in a way that xmax is 0, i.e., xlim(10, 0). -JJ

Re: [Matplotlib-users] Animation with copy_from_bbox / restore_region.

2009-05-14 Thread Jae-Joon Lee
This is now committed to svn trunk, with slight changes in its api. An example is added (examples/animation/animation_blit_gtk2.py). -JJ -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your

Re: [Matplotlib-users] Annotations with pan / zoom

2009-05-14 Thread Jae-Joon Lee
On Thu, May 14, 2009 at 4:36 AM, Ben Coppin cop...@gmail.com wrote: Hi, I've added annotations to a graph I am producing using matplotlib. The annotations work fine, but when you zoom and pan, the annotations move off the edge of the chart and are still visible while they're in the main TK

Re: [Matplotlib-users] Annotations with pan / zoom

2009-05-14 Thread Jae-Joon Lee
You can't do this using the existing support for clipping artists?  I was planning on cooking up an example that did just that, but haven't yet found the time. What I want (and what I think is desirable) is that the annotation should be drawn when (and only when) the xy coordinate is inside

Re: [Matplotlib-users] problem with usetex \color

2009-05-13 Thread Jae-Joon Lee
of b) still exists. Do you have any idea what I'm doing wrong? Thanks in advance for any hints. best regards Matthias On Tuesday 12 May 2009 20:46:06 Jae-Joon Lee wrote: On Tue, May 12, 2009 at 5:04 AM, Matthias Michler matthiasmich...@gmx.net wrote: Hello list, I'm not sure

Re: [Matplotlib-users] problem with usetex \color

2009-05-12 Thread Jae-Joon Lee
As Jouni suggested, I guess the best chance here is to use phantom command. Here is a little example. rc('text', usetex=True) p1, = plot([1,2,3]) legend([p1, p1, p1, p1], [rd = $\phantom{0}1$ m, d = $10$ m, d = $23$ m, d = $91$ m]) -JJ On Tue, May 12, 2009 at 6:52 AM, Jouni K. Seppänen

Re: [Matplotlib-users] problem with usetex \color

2009-05-11 Thread Jae-Joon Lee
The resulting graph is not colored -- but in the directory ~/.matplotlib/tex.cache/ the text is green, both in the dvi and the png file! It therefore seems to me that this is not completely hopeless but I cannot figure out how to proceed. As far as I know, in matplotlib, all the tex png

Re: [Matplotlib-users] logarithmic scale of colorbar with ticks and custom labels

2009-05-07 Thread Jae-Joon Lee
http://matplotlib.sourceforge.net/api/figure_api.html?highlight=colorbar#matplotlib.figure.Figure.colorbar cbar = colorbar(ticks=lev, format = l_f) -JJ On Wed, May 6, 2009 at 3:28 PM, Sebastian Pająk spcon...@gmail.com wrote: Hello I have a contour plot with specified number of levels

Re: [Matplotlib-users] using MPL and ipython run command

2009-05-06 Thread Jae-Joon Lee
Try to put plt.draw() before plt.show(). My guess is that what show() does is to create figure windows, and in most cases it does not redraw the figure (Tk backend is always an exception). So, this may not be a bug. But I hope some who knows well about the backends clarify this. Regards, -JJ

Re: [Matplotlib-users] mpl sphinx extension

2009-05-04 Thread Jae-Joon Lee
I believe that it is just moved to another directory (lib/matplotlib/sphinxext). http://www.nabble.com/Re%3A-Sphinx-custom-extension-mess%2C-and-patches-p22037746.html Regards, -JJ On Mon, May 4, 2009 at 11:02 AM, Timmie timmichel...@gmx-topmail.de wrote: Hello, why is the

Re: [Matplotlib-users] Enforcing common view limits

2009-05-02 Thread Jae-Joon Lee
ax.twin returns a ParasiteAxesAuxTrans instance which is derived from the mpl's original Axes, but only drawing-related methods are meant to be meaningful. For example, this axes is never meant to be added to the figure and the draw method of this axes is never meant to be called. I haven't looked

Re: [Matplotlib-users] Font size and savefig

2009-04-30 Thread Jae-Joon Lee
2009, at 00:24, Jae-Joon Lee wrote: On Tue, Apr 28, 2009 at 11:09 PM, John Hunter jdh2...@gmail.com wrote: If you want the relative fontsizes in the figure window and saved figure to agree, pass the same dpi to the figure command and savefig command. John, I thought the font size (which

Re: [Matplotlib-users] Problem assigning labels in legends

2009-04-30 Thread Jae-Joon Lee
Is there any specific reason that you have to use figlegend, instead of legend? I'm asking this because the legend command automatically collect all the relevant information for you, i.e., you can just do legend() Of course the legend is displayed inside the axes unlike the figlegend. If

Re: [Matplotlib-users] last tick label not showing up

2009-04-29 Thread Jae-Joon Lee
On Wed, Apr 29, 2009 at 12:21 PM, Matthias Michler matthiasmich...@gmx.net wrote: where the last tick is out of the xlimits. Could this be the case for your example, too? Nevertheless the question still would be: Is this a bug in the handling of xticks and their corresponding labels?

Re: [Matplotlib-users] Pixel Position of X/Y Axis

2009-04-29 Thread Jae-Joon Lee
You may use the bbox attribute of the axes. For example, ax.bbox.extents gives you the x,y coordinates of the lowerleft and topright corners. -JJ On Wed, Apr 29, 2009 at 4:06 PM, Mark Larsen larsen...@gmail.com wrote: It's been a while, please allow me to bump this... Sorry.  I use

Re: [Matplotlib-users] Font size and savefig

2009-04-28 Thread Jae-Joon Lee
On Tue, Apr 28, 2009 at 11:09 PM, John Hunter jdh2...@gmail.com wrote: If you want the relative fontsizes in the figure window and saved figure to agree, pass the same dpi to the figure command and savefig command. John, I thought the font size (which is specified in points) is independent of

Re: [Matplotlib-users] Animation with copy_from_bbox / restore_region.

2009-04-24 Thread Jae-Joon Lee
but thanks, And thanks, and ever thanks.    -- William Shakespeare On Thu, Apr 23, 2009 at 1:21 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote: On Mon, Apr 20, 2009 at 4:34 PM, Elan Pavlov e...@mit.edu wrote: Hi, I'm trying to use matplotlib for animating data as it is received from an online

Re: [Matplotlib-users] Getting updated axes bounding box

2009-04-24 Thread Jae-Joon Lee
Hi Ryan, The Axes in the svn version of the mpl has a axes_locator property , which is meant to be used to update the location of the axes at the drawing time. Try to insert the following code before the show and see if it works for you. from matplotlib.transforms import Bbox def

Re: [Matplotlib-users] SpanSelector on multiple figures

2009-04-24 Thread Jae-Joon Lee
think this is common practice in event handling. The partial function can be handy. http://docs.python.org/library/functools.html Regards, -JJ I'll let you know if this works or not. Kind regards, Frederic Jae-Joon Lee wrote: On Mon, Apr 20, 2009 at 4:09 PM, fjldurodie frederic.duro

Re: [Matplotlib-users] SpanSelector on multiple figures

2009-04-23 Thread Jae-Joon Lee
On Mon, Apr 20, 2009 at 4:09 PM, fjldurodie frederic.duro...@googlemail.com wrote: Hi, I'm wondering if it is possible to use SpanSelector on multiple figures : my problem is that I can't think of a way to tell the onselect on which axes(ses) of which figure it should try and do something.

Re: [Matplotlib-users] Animation with copy_from_bbox / restore_region.

2009-04-23 Thread Jae-Joon Lee
On Mon, Apr 20, 2009 at 4:34 PM, Elan Pavlov e...@mit.edu wrote: Hi, I'm trying to use matplotlib for animating data as it is received from an online source (online in the algorithmic sense not internet:). I'd like the graph plot to be updated with high frequency since the data changes

Re: [Matplotlib-users] 3rd y-axis in plot

2009-04-23 Thread Jae-Joon Lee
On Thu, Apr 23, 2009 at 3:54 AM, philscher p.hilsc...@lsw.uni-heidelberg.de wrote: Hello, I need to plot 3 functions into the same plot, each having different scales (same x, different y values). For the first 2 functions I can use twinx(). But how can I include a 3rd axis, which should

Re: [Matplotlib-users] imshow scaling

2009-04-13 Thread Jae-Joon Lee
Explicitly set the aspect to auto. imshow(image, aspect=auto) http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow -JJ On Mon, Apr 13, 2009 at 12:20 PM, rmber ryanmbergm...@gmail.com wrote: Is there a way to make imshow scale images to dimensions other than that

Re: [Matplotlib-users] matplotlib.pyplot.pcolor and matplotlib.pyplot.savefig unexpectedly slow

2009-04-13 Thread Jae-Joon Lee
Is there any particular reason that you have to use pcolor? My understanding is that the imshow is the fastest. Also, pcolormesh is much faster than pcolor if you use agg backend. Your script runs in a second on my linux box if I replace pcolor with pcolormesh. -JJ On Mon, Apr 13, 2009 at

Re: [Matplotlib-users] Lines and columns in legends

2009-04-12 Thread Jae-Joon Lee
that the normalized axes coordinates and I do not know how to properly transfrom them which leads to the hacky  /5   , otherwise the legends are off the figure. Any suggestions on how I can automate this part? Thanks in advance. Jae-Joon Lee Thu, 09 Oct 2008 12:21:56 -0700 Although I think

Re: [Matplotlib-users] updating subplot position with a position string

2009-04-11 Thread Jae-Joon Lee
You can change the position of the subplot using change_geometry method, although it does not accept a sting argument. s1.change_geometry(2,1,1) # instead of 211 -JJ On Sat, Apr 11, 2009 at 4:59 PM, TP paratribulati...@free.fr wrote: Hi everybody, I would like to update a subplot

Re: [Matplotlib-users] convert a masked array to a non masked one?

2009-04-11 Thread Jae-Joon Lee
I guess you want this. http://docs.scipy.org/doc/numpy/reference/generated/numpy.ma.filled.html#numpy.ma.filled -JJ On Sat, Apr 11, 2009 at 3:36 PM, antonv vasilescu_an...@yahoo.com wrote: Hi all, Another noob question here. I have a large masked array that I am plotting with contourf and

Re: [Matplotlib-users] Plotting Scalar on a Circular Grid

2009-04-03 Thread Jae-Joon Lee
I'm afraid that I'm still confused and there seems to be not much thing I can help.. You're considering a circle, but you already have your function in a cartesian coordinate. I'm not sure why you can't just plot in a cartesian coordinate? (in other words, what is wrong with your original

Re: [Matplotlib-users] Plotting Scalar on a Circular Grid

2009-04-02 Thread Jae-Joon Lee
On Wed, Apr 1, 2009 at 6:50 AM, Lorenzo Isella lorenzo.ise...@gmail.com wrote: Now, I would like to plot exactly the same function but on a circular domain (circle of radius 1 centered at (0,0)). You have an image with x,y spanning from -1 to 1. How do you transform your x,y coordinate to r,

Re: [Matplotlib-users] legends with fill_between

2009-04-01 Thread Jae-Joon Lee
The matplotlib legend does not currently support fill_between. As a matter of fact, fill_between command creates RegularPolyCollection artist, and the mpl legend does not know how to handle this kind of artist at this time. And I personally do not have good idea how to draw a handle for this (a

Re: [Matplotlib-users] embedding figures inside another (coordinates)

2009-04-01 Thread Jae-Joon Lee
This thread might be helpful. http://thread.gmane.org/gmane.comp.python.matplotlib.general/16373 Take a look at the above thread and see if it fits your need. However, it became tricky if your axes adjust its position (e.g., aspect=1) during the drawing time. The example below will be helpful

Re: [Matplotlib-users] legend with errorbar() problem

2009-03-31 Thread Jae-Joon Lee
Hi, Unfortunately, the current legend frame work does not support errorbars. And I don't think implementing this is easy. The thing is that errorbar creates multiple artists instead of single one. The best workaround I can think of is to make the legend only with markers (and lines if you want),

Re: [Matplotlib-users] offset in dragging a legend

2009-03-25 Thread Jae-Joon Lee
I don't have wx installed, so i'm not able to test your code. However, here are some of my thoughts. The location of the legend is the location of the lower-left corner in the normalized coordinate of its parent. In your case, it would be normalized axes coordinates. However, it seems that you're

Re: [Matplotlib-users] Leftmost column of PNG output is transparent

2009-03-25 Thread Jae-Joon Lee
I couldn't reproduce it (my output has no transparent column). I'm running the current svn. I wonder if others can reproduce it. Kevin, what happen if you only do one of the pcolor or the contourf (it is not clear why you're calling pcolor as it will be overridden by contourf)? -JJ On Mon, Mar

Re: [Matplotlib-users] offset in dragging a legend

2009-03-25 Thread Jae-Joon Lee
As I said in my previous email, the _loc attribute of the legend need to be in the normalized axes coordinate, i.e., the lower left corner of the axes being (0,0) and the upper-right corner being (1,1). Thus, it needs to be something like below. loc_in_canvas = self.legend_x + mouse_diff_x,

Re: [Matplotlib-users] offset in dragging a legend

2009-03-25 Thread Jae-Joon Lee
On Wed, Mar 25, 2009 at 9:06 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote: As I said in my previous email, the _loc attribute of the legend need to be in the normalized axes coordinate, i.e., the lower left corner of the axes being (0,0) and the upper-right corner being (1,1). Thus, it needs

Re: [Matplotlib-users] Working with arrows

2009-03-25 Thread Jae-Joon Lee
You need to adjust the keyword arguments, such as head_width, etc. The arrow command itself is poorly documented and its keyword arguments are explained in matplitlib.patches.FancyArrow. However, I recommend you to use annotate command instead of arrow (you can give empty string if you just need

Re: [Matplotlib-users] offset in dragging a legend

2009-03-25 Thread Jae-Joon Lee
Ah, my bad. Try self.legend.parent.transAxes.inverted().transform_point(loc_in_canvas) legend.parent points to the parent axes. -JJ On Wed, Mar 25, 2009 at 9:36 PM, C M cmpyt...@gmail.com wrote: On Wed, Mar 25, 2009 at 9:06 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote: As I said in my

Re: [Matplotlib-users] offset in dragging a legend

2009-03-25 Thread Jae-Joon Lee
speed, you may consider to use blit method. http://matplotlib.sourceforge.net/examples/animation/animation_blit_wx.html -JJ On Wed, Mar 25, 2009 at 10:55 PM, C M cmpyt...@gmail.com wrote: On Wed, Mar 25, 2009 at 9:58 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote: Ah, my bad. Try

Re: [Matplotlib-users] Wide y-axis major tick labels

2009-03-24 Thread Jae-Joon Lee
http://matplotlib.sourceforge.net/faq/howto_faq.html#move-the-edge-of-an-axes-to-make-room-for-tick-labels something like fig.subplots_adjust(left=0.2) would work. -JJ On Tue, Mar 24, 2009 at 11:43 AM, Andy Yates newsp...@gmail.com wrote: I am trying to generate plots where the y-axis major

Re: [Matplotlib-users] problems with contourf alpha

2009-03-17 Thread Jae-Joon Lee
Reading Eric's reply on the previous email, my impression is that contourf is not supposed to draw the boundary (no stroke!). But it seems it still does. for c in cs.collections: c.set_edgecolor(none) After this, I can get rid of the vertical lines. I can see slight gaps between filled

Re: [Matplotlib-users] forgetful xlim?

2009-03-11 Thread Jae-Joon Lee
Try aa.set_autoscale_on(False) before your make_xaxis call (but after xlim and ylim changed). When you plot something, the xlim and ylim is automatically adjusted (unless you set autoscale=False). -JJ On Wed, Mar 11, 2009 at 2:31 PM, Nicholas Stephens nicholas.steph...@univ-brest.fr wrote:

Re: [Matplotlib-users] legend bug?

2009-03-11 Thread Jae-Joon Lee
It can be tricky to give you a correct answer without knowing what version of mpl you're using. The legend for the scatter plot has been added rather recently so my answer below may not work for you. Anyhow, this seems to be a bug in the documentation, not the code. The legend for scatter plot

Re: [Matplotlib-users] Pause/waitforbuttonpress behavior.

2009-03-09 Thread Jae-Joon Lee
I have no idea whether this is related with the GIL. Anyhow, you may work around this by running the blocking function in a separate thread, although I only tested this with Gtk backends. Here is a related post.

Re: [Matplotlib-users] barchart: center xticklabels for only one data set

2009-03-07 Thread Jae-Joon Lee
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.bar use ax.set_xticks(ind+width*.5) instead of ax.set_xticks(ind+width) -JJ On Thu, Mar 5, 2009 at 1:40 PM, Timmie timmichel...@gmx-topmail.de wrote: Hello, I tried to modify the bar chart demo for my case. I

Re: [Matplotlib-users] figlegend: doesn't display markers

2009-03-07 Thread Jae-Joon Lee
Your code works fine for me with mpl 0.98.5.2. What version of mpl are you using? print matplotlib.__version__ -JJ On Thu, Mar 5, 2009 at 12:03 PM, Erik Granstedt egranst...@gmail.com wrote: Hello, I found an issue in working with subplots and using figlegend: it doesn't display markers.  

Re: [Matplotlib-users] Rotate legend ?

2009-03-01 Thread Jae-Joon Lee
a normal bar chart (vertical bars) and rotate the whole figure (please see attached file), this is why I need the legend to be 90°-rotated, so that it's in the right position afterall. Thanks for your time. Regards. N. 2009/3/1 Jae-Joon Lee lee.j.j...@gmail.com I don' think

Re: [Matplotlib-users] xticklabels printed twice when using twinx

2009-02-28 Thread Jae-Joon Lee
Hi Erick, Is there any particular reason to introduce _xaxison and _yaxison, instead of using set_visible(False) on the xaxis and yaxis? Just wondering.. -JJ On Sat, Feb 28, 2009 at 1:52 PM, Eric Firing efir...@hawaii.edu wrote: Christoffer Aberg wrote: Hi all, I have noticed a funny

Re: [Matplotlib-users] setting font of axes ticklabels and making labels not overlap

2009-02-28 Thread Jae-Joon Lee
but it does not work. i tried similarly setting the font size (with set_size() or through rcParams) but it did not work either. how can i do this? i'd like to do this either on per axes basis, or for the entire figure. It seems that changing rcParams is not effective because of the way how

Re: [Matplotlib-users] removing leading zeros in ticklabels

2009-02-28 Thread Jae-Joon Lee
FormatStrFormatter (and other formatters) rely on Python's string interpolation, and It does not seem to be possible to get rid of the leading zero (http://docs.python.org/library/stdtypes.html). I think what you can do is to replace 0. with . after the interpolation. Something like below works

Re: [Matplotlib-users] setting font of axes ticklabels and making labels not overlap

2009-02-28 Thread Jae-Joon Lee
(l)) fp = FontProperties(family=Lucida Sans Typewriter) fp.__hash__ = my_hash runs, but does not change the font either. would be very interested if you have any other ideas? thanks. On Sat, Feb 28, 2009 at 6:04 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote: On Sat, Feb 28

Re: [Matplotlib-users] Rotate legend ?

2009-02-28 Thread Jae-Joon Lee
I don' think these is a straight forward way to rotate the legend as a whole. As a matter of fact, it is hardly possible with the current implementation of the legend class. Could you explain why do you want to have a rotated legend? An example figure (from other plotting package) will be very

Re: [Matplotlib-users] polar graph

2009-02-27 Thread Jae-Joon Lee
I recommend you to use the Wedge class in matplotlib.patches. from matplotlib.patches import Wedge # draw a wedge in the axes coordinate. (0.5, 0.5) in axes coordinate corresponds to (0,0) in polar coordinate. trans = ax.transAxes center, R = (0.5, 0.5), 0.5 twopi=360. pie1 = Wedge(center, R, 0,

Re: [Matplotlib-users] Legend grows in wrong direction

2009-02-26 Thread Jae-Joon Lee
On Thu, Feb 26, 2009 at 4:51 AM, Søren Nielsen soren.skou.niel...@gmail.com wrote: I've tried placing a legend using the loc = (x,y) .. and the legend is moved where I want it. the problem is, when I add new lines to the plot.. the legend grows, but upwards.. so the lower left point of the

<    2   3   4   5   6   7   8   >