Re: [Matplotlib-users] LaTeX Mathdesign Fonts patch?

2010-04-14 Thread Jae-Joon Lee
On Sat, Apr 10, 2010 at 10:36 AM, arsbbr wrote: > but it doesn't > work. > Can you provide more details of what you tried and "how" it does not work. For example, an exception is raised? or code runs without any error but the result is not correct? With my simple test, all things seem fine. I di

Re: [Matplotlib-users] matplotlib colors vs html colors

2010-04-14 Thread Jae-Joon Lee
On Sun, Apr 11, 2010 at 12:40 PM, Peter Butterworth wrote: > sorry if this has been covered before, but I must say I've found the > following quite confusing : > color="cyan" is not in fact equivalent to color='c' > > > in colors.py  : > > Commands which take color arguments can use several format

Re: [Matplotlib-users] colorbar+log+latex

2010-04-19 Thread Jae-Joon Lee
I'm not sure if the default formatter needs to be changed. However, you may try import matplotlib.ticker as ticker formatter=ticker.LogFormatterMathtext() colorbar(format=formatter) which will render colorbar ticklabels with mathtext mode. Regards, -JJ On Fri, Apr 16, 2010 at 3:56 AM, Yves Re

Re: [Matplotlib-users] controlling padding between axis and ticklabels in polar plots

2010-04-19 Thread Jae-Joon Lee
There seems no obvious way to change the padding. You may use *set_rgrids* method which takes rpad parameter but you need to specify the tick locations also. Here is a simple function taken from set_rgrids method, that only change the padding. def update_rpads(ax, rpad): angle = ax._r_label1_

Re: [Matplotlib-users] Issues with Circle

2010-04-26 Thread Jae-Joon Lee
On Fri, Apr 23, 2010 at 11:07 AM, Thomas Robitaille wrote: > Hi, > > I'm having issues with translucent patches. The following code > > import matplotlib > matplotlib.use('Agg') > import matplotlib.pyplot as mpl > from matplotlib.patches import Circle > > fig = mpl.figure() > ax = fig.add_subplot(

Re: [Matplotlib-users] Plotting 2d fourier amplitudes

2010-04-26 Thread Jae-Joon Lee
Did you try to change vmin, vmax? http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow If this is not what you want, please describe more explicitly why the colorbar is wrong. Regards, -JJ On Mon, Apr 26, 2010 at 11:37 AM, Nikolaus Rath wrote: > The problem with ims

Re: [Matplotlib-users] Transparent figures no longer working

2010-04-26 Thread Jae-Joon Lee
Looking at the code, the "transparent" option set alphas of paches to 0, which I think is simply ignored in ps backend (which does not support alpha). I think it is better if the visibility of patches is set to False when the "transparent" option is set. Setting patch's (face) color to "none" work

Re: [Matplotlib-users] Plotting 2d fourier amplitudes

2010-04-26 Thread Jae-Joon Lee
> > I did not try vmin and vmax, because > On 04/26/2010 02:31 PM, Jae-Joon Lee wrote: >> Did you try to change vmin, vmax? >> >> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow >> >> If this is not what you want, please describe

Re: [Matplotlib-users] Horizontal and vertical lines between subplots

2010-04-30 Thread Jae-Joon Lee
You may do this without creating an extra axes (ax0). Try something like ax4.plot([0.5, 0.5], [0, 1], color='lightgreen', lw=5, transform=gcf().transFigure, clip_on=False) Regards, -JJ On Fri, Apr 30, 2010 at 3:56 AM, Matthias Michler wrote: > On Wednesday 28 April 2010 15:07:21 Maxi

Re: [Matplotlib-users] Labels end up outside figure

2010-04-30 Thread Jae-Joon Lee
On Thu, Apr 29, 2010 at 12:40 PM, acoffeemug wrote: > Does anyone know a good fix for this? Preferably one which doesn't involve > manual resizing? http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels While example in the link try to make a room for tickla

Re: [Matplotlib-users] plotting once, but two labels in legend?

2010-05-01 Thread Jae-Joon Lee
On Wed, Apr 28, 2010 at 3:48 AM, David Epstein wrote: > Here is the problem: each row is read once and those that matche > the "if" statement are plotted once--but somehow generate TWO LABELS in > the legend. How is that possible?! I've attached a code snippet below. I > apologize for any sloppy c

Re: [Matplotlib-users] re move / delete arrow / annotate, how to?

2010-05-04 Thread Jae-Joon Lee
Fixed in r8295. Axes.annotate was not setting the _remove_method attribute. Regards, -JJ On Tue, May 4, 2010 at 3:15 PM, Ryan May wrote: > On Tue, May 4, 2010 at 2:09 PM, KrishnaPribadi > wrote: >> I'm trying to remove or delete an annotate arrow but I'm unsuccessful. Can >> some please help?

Re: [Matplotlib-users] get_*gridlines alwys returns the same things?

2010-05-05 Thread Jae-Joon Lee
On Tue, May 4, 2010 at 6:27 PM, Nico Schlömer wrote: > That's really independent of whether the grid is on or off. > > Is there any explanation for it that does not have to do with Harry > Potter or the Jedi? ;) > positions of gridlines (and ticks, ticklabels, etc) are updated during the drawing

Re: [Matplotlib-users] imshow seems to fail on some (int16?) arrays

2010-05-06 Thread Jae-Joon Lee
On Thu, May 6, 2010 at 10:18 AM, Antony Lee wrote: > asarray (and there's no copy) works too, so my question now is rather, why > does imshow cast (I suppose that's what it does) 32bit arrays but not 16bit > ones? > Thanks for your help. > Antony It turns out that this is not a 16bit-32bit issue.

[Matplotlib-users] introducing mpl_toolkits.gridspec

2010-05-11 Thread Jae-Joon Lee
Hi, gridspec is a module that implements matplotlib’s Subplot slightly differently. Current matplotlib’s Subplot only allows a Subplot to occupy a single cell of the n x m grid. gridspec enables a Subplot to occupy multiple cells. http://leejjoon.github.com/mpl_toolkits-gridspec/ The code is

Re: [Matplotlib-users] introducing mpl_toolkits.gridspec

2010-05-11 Thread Jae-Joon Lee
On Tue, May 11, 2010 at 12:10 PM, Ryan May wrote: > 1) How does this relate to the functionality present in your axes_grid > toolkit? axes_grid toolkit is more flexible and is mainly meant to work with axes with images. gridspec is more for normal axes. As a matter of fact, the multiple axes cr

Re: [Matplotlib-users] introducing mpl_toolkits.gridspec

2010-05-12 Thread Jae-Joon Lee
On Tue, May 11, 2010 at 1:38 PM, John Hunter wrote: > This looks sufficiently general and useful that we may simply want it > to live in the main tree (not as a toolkit) and have subplot2grd > helper functionality available directly from pyplot. > Okay. I'll merge this into the main tree and comm

Re: [Matplotlib-users] introducing mpl_toolkits.gridspec

2010-05-12 Thread Jae-Joon Lee
On Wed, May 12, 2010 at 5:58 AM, Yannick Copin wrote: > gs = gridspec.GridSpec(3, 3) > ax1 = gs[0, :] > I'm inclined to leave the GridSpec as it is and I prefer to have a separate class for this (if we go for it). My inclination is to modify subplot2grid to return such an instance. e.g., grid =

Re: [Matplotlib-users] align title of subplot with ylabel

2010-05-18 Thread Jae-Joon Lee
This can be done relatively easily with the current svn version of matplotlib (r8319). Below is the modified version of your code. See http://matplotlib.sourceforge.net/trunk-docs/users/annotations_guide.html#using-complex-coordinate-with-annotation for how the annotation works. While this is c

Re: [Matplotlib-users] How to remove an element from a graph?

2010-05-18 Thread Jae-Joon Lee
On Sun, May 16, 2010 at 3:19 PM, Philipp K. Janert wrote: > Is this the best way to do this, or is there another way > (or one that does not require an explicit draw()?). Also, Any change in your figure is realized when you "draw()" the figure. So there is no way that does not require an explicit

Re: [Matplotlib-users] introducing mpl_toolkits.gridspec

2010-05-19 Thread Jae-Joon Lee
The functionality of the gridspec is now merged into the matplotlib. The updated documentation can be found in http://matplotlib.sourceforge.net/trunk-docs/users/gridspec.html Regards, -JJ On Tue, May 11, 2010 at 11:57 AM, Jae-Joon Lee wrote: > Hi, > >  gridspec is a module that i

Re: [Matplotlib-users] LaTeX error on semilogy + usetex + SubplotHost

2010-05-20 Thread Jae-Joon Lee
I cannot reproduce this error. I'm using r8330 on Linux. I guess the error does not occur when you use a normal subplot? Just in case, replace axes_grid with axes_grid1 and see if it makes any difference, i.e., from mpl_toolkits.axes_grid1.parasite_axes import SubplotHost Regards, -JJ On Thu

Re: [Matplotlib-users] How to have few marks on the lines?

2010-05-20 Thread Jae-Joon Lee
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.plot use *markevery* keyword. http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.lines.Line2D.set_markevery If you want more control, you can always draws the lines (without markers) first and overplot markers

Re: [Matplotlib-users] LaTeX error on semilogy + usetex + SubplotHost

2010-05-20 Thread Jae-Joon Lee
It turns out that when axes_grid toolkit is used and there are some ticks does not have associated ticklabels (i.e., minor ticks), it tries to call the "get_texts_widths_heights_descents" method with empty string. The following patch prevent this. --- a/lib/mpl_toolkits/axisartist/axis_artist.py +

Re: [Matplotlib-users] Radar chart with multiple scales?

2010-05-20 Thread Jae-Joon Lee
On Thu, May 13, 2010 at 11:25 PM, Uri Laserson wrote: > I noticed that the example for the radar chart has only a single scale.  Is > there a way to generate a radar plot where each axis has its own scale? Can you show us some example plots? I'm not clear what you want. Regards, -JJ --

Re: [Matplotlib-users] get_tick{label}s: are tick labels drawn?

2010-05-20 Thread Jae-Joon Lee
Like the gridlines, these are determined during the drawing time. Each tick instances have tick1On tick2On label1On label2On attributes that controls whether to draw tick (or ticklabel) or not. Again, note that not all ticks that are returned by get_xticks() methods may be actually drawn. -JJ

Re: [Matplotlib-users] get_tick{label}s: are tick labels drawn?

2010-05-20 Thread Jae-Joon Lee
On Thu, May 20, 2010 at 3:17 PM, Jae-Joon Lee wrote: > Again, note that not all ticks that are returned by get_xticks() > methods may be actually drawn. > I mean, even if their tick1On (and others) is T

Re: [Matplotlib-users] get_tick{label}s: are tick labels drawn?

2010-05-20 Thread Jae-Joon Lee
On Mon, May 10, 2010 at 12:19 PM, Nico Schlömer wrote: > When tick labels are explicitly supplied, that may not actually > reflect in the return result of get_ticks. Specifically, I set the > tick labels in a color bar, but get_ticklabels() returns a list of > empty text objects Text(0,0,''). > Fo

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

2010-05-21 Thread Jae-Joon Lee
On Wed, May 19, 2010 at 5:47 PM, Solomon M Negusse wrote: > Hello, > I came across  problem of label rotation with autofmt_xdate() in subplothost > too. Is there a new version with the bug fixed or a workaround to doing the > label rotation in subplothost? > While this is fixed in the svn, there

Re: [Matplotlib-users] updating an image plot

2010-05-21 Thread Jae-Joon Lee
set_array method only update the underlying array, and no more. The problem is that, the first imshow results in clim=(0,0) and set_array does not change this. You may manually update the clim of the image, or you may explicitly call autoscale() after set_array. Regards, -JJ On Fri, May 21, 2

Re: [Matplotlib-users] Dual x-axes with transformation

2010-05-26 Thread Jae-Joon Lee
You need to define your own transform. And the best way is to read through the transforms.py. Here is a modified version of your example that uses a custom transform. However, often you may need to use a custom locator also for this kind of transform. HTH, -JJ from matplotlib.transforms import

Re: [Matplotlib-users] Remove ticklines but keep labels

2010-05-26 Thread Jae-Joon Lee
There is no clear api to manage this. Try something like ax = gca() for t in ax.xaxis.get_major_ticks(): t.tick1On = False t.tick2On = False -JJ On Wed, May 26, 2010 at 6:30 AM, John Reid wrote: > Hi, > > This is probably easy to do but I didn't work it out from the > documentation so

Re: [Matplotlib-users] displaying a legend from a different subplot

2008-07-14 Thread Jae-Joon Lee
Hi, Try mylines = plot1.get_lines() plot2.legend(mylines, [p.get_label() for p in mylines]) When you call the legend method with two arguments, first argument is a list of lines and second argument is a list of labels. It does not seem to matter whether lines are from same axes. Hope this help

Re: [Matplotlib-users] draw upper and lower limits

2008-07-31 Thread Jae-Joon Lee
If you're like me and what you want is just an arrow mark with its head at (x,y), you may use scatter() with custom verts. arrowup_verts = [[0.,0.], [-1., -1], [0.,0.], [0.,-2.],[0.,0.], [1, -1]] arrowdown_verts = [[0.,0.], [-1., 1], [0.,0.], [0.,2.],[0.,0.], [1, 1]] scatter([1.],[1.]

Re: [Matplotlib-users] ticks & labels

2008-08-11 Thread Jae-Joon Lee
A minor comment. John's code may give incorrect results when exponents are negative. int() truncates a floating point argument towards zero, e.g., int(-1.5) == -1 not -2. I guess calling floor() before int() will work. fx = int(np.floor(np.log(abs(val))/np.log(self._base) +0.5)) -JJ On

Re: [Matplotlib-users] Control space between bars

2008-08-14 Thread Jae-Joon Lee
Hi Mathieu, It seems to me that you're confused with the meaning of the transAxes. It is a transform from the Axes coordinate to the Canvas(?) coordinate. As far as I can see, what you seemed to want is a transform between Data coordinate and Axes coordinate, and that would be transScale + transLi

Re: [Matplotlib-users] incorrect window_extent of rendered text in pdf backend

2008-08-18 Thread Jae-Joon Lee
tter being correct than being fast. Regards, -JJ On Mon, Aug 18, 2008 at 6:09 PM, Jae-Joon Lee <[EMAIL PROTECTED]> wrote: > Hi, > > The pdf backend seems to return incorrect window extent (i.e., return > value of get_window_extent()) when usetex==True. > I'm a

Re: [Matplotlib-users] Possible to add errorbars to existing line2D plots?

2008-08-19 Thread Jae-Joon Lee
You may use the "errorbar" function to draw lines (including errorbars) and then hide (and show again) errorbars. From the errorbar documentation, Return value is a length 3 tuple. The first element is the :class:`~matplotlib.lines.Line2D` instance for the *y* symbol lines. The seco

Re: [Matplotlib-users] Label baseline not aligned

2008-08-19 Thread Jae-Joon Lee
Hi, As far as I know, xticklabels in matplotlib are "top"-aligned, so you may see misaligned baseline sometimes. Still, the problem you reported seems to be a bug in the pdf-backend. I posted a simple bug fix of the pdf backend http://article.gmane.org/gmane.comp.python.matplotlib.general/14041

Re: [Matplotlib-users] two legends

2008-08-20 Thread Jae-Joon Lee
Hi, The legend of an axes instance is stored in axes.legend_ attribute. And your second legend call will simply rebind this attribute to the new legend object, and the first one is never drawn. You may make a custom Axes class which can hold multiple legends. But if you want something quick, fir

Re: [Matplotlib-users] word wrap

2008-08-21 Thread Jae-Joon Lee
Hi, I guess the extent of the rendered text is not known until the figure is drawn. The link below would be helpful. http://matplotlib.sourceforge.net/doc/html/faq/howto_faq.html#how-do-i-automatically-make-room-for-my-tick-labels So. it is possible to know the text length, but you need to wait

Re: [Matplotlib-users] Automatically make room for my tick labels without GUI ?

2008-08-21 Thread Jae-Joon Lee
While I don't know much about how callbacks work in matplotlib, looking at the source code of figure.draw() method, it seems that call_back functions connected with the "draw_event" are called after a figure is drawn. Therefore, you need a second draw. My guess is that this second draw is somehow a

Re: [Matplotlib-users] Arrows using Line2D and shortening lines

2008-08-22 Thread Jae-Joon Lee
Hi Jason, I did made a similar class sometime ago and I'm attaching it just in case. I guess it is very similar to yours but I rely on matplolib.patches.FancyArrow class to draw the arrow head. The circle drawn by scatter() command should be a circle with size s (the third argument of the scatter

Re: [Matplotlib-users] Arrows using Line2D and shortening lines

2008-08-24 Thread Jae-Joon Lee
Sure. you may include it if you want. -JJ On Sat, Aug 23, 2008 at 12:10 AM, Jason Grout <[EMAIL PROTECTED]> wrote: > Jae-Joon Lee wrote: >> Hi Jason, >> >> I did made a similar class sometime ago and I'm attaching it just in >> case. I guess it

Re: [Matplotlib-users] axis formatting

2008-08-27 Thread Jae-Joon Lee
You can suppress the tick marks on the top and right axis as Mathieu suggested. Setting frame_on as False will suppresse both the bounding lines and the white background patch of the axes. You can suppress only the bounding lines by ax = gca() ax.frame.set_visble(False) Note that this will dele

Re: [Matplotlib-users] axis formatting

2008-08-27 Thread Jae-Joon Lee
roken. Any idea where > I could get the file? > > Thanks! > Uri > > On Wed, Aug 27, 2008 at 14:38, Jae-Joon Lee <[EMAIL PROTECTED]> wrote: >> >> You can suppress the tick marks on the top and right axis as Mathieu >> suggested. Setting frame_on as False w

Re: [Matplotlib-users] imshow and projections

2008-09-04 Thread Jae-Joon Lee
> 2. I have a skymap I would like to plot using a particular projection > - what I've been doing so far is specifying x and y coordinates using > mgrid and calling contourf(x,y,data,100) to approximate this. But > what I'd rather do is something like > imshow(data,extent=[-pi,pi,-pi/2,pi/2]) ... w

Re: [Matplotlib-users] eliminating the top tick on an axis

2008-09-11 Thread Jae-Joon Lee
Hi, It seems that there is no guarantee that the get_major_ticks() methods returns only ticks within the view interval, i.e., it can return ticks outside the data limit. As far as I see, this is related with the general behavior of locator objects. For example, In [71]: ax.yaxis.get_view_interv

Re: [Matplotlib-users] How to give a name to a figure?

2008-09-15 Thread Jae-Joon Lee
To change the window title, you may use fig.canvas.set_window_title("My Title") But I couldn't find any public method to obtain the current window title. If you just want to have a title associated with a figure, I guess you can simply define your title attribute. For example, fig.my_figure_t

Re: [Matplotlib-users] How to give a name to a figure?

2008-09-15 Thread Jae-Joon Lee
> > Kind of awkward, but > > fig.canvas.manager.window.wm_title() > I guess this is backend dependent. In my Gtk backend, I don't have such a method. But I found fig.canvas.manager.window.get_title(). Thanks! -JJ - This SF.

Re: [Matplotlib-users] yaxis labels using subplot

2008-09-17 Thread Jae-Joon Lee
I believe that "set" function in matplotlib has been deprecated (because "set" is now python builtin). Instead, you have to use "setp". Setting "xticks" (or "yticks") changes the tick locations. If you're trying to turn off only the labels, you may use use setp(gca().get_yticklabels(), visible=F

Re: [Matplotlib-users] adding a filled rectangle

2008-09-17 Thread Jae-Joon Lee
import matplotlib.pyplot as plt import matplotlib.patches as mpatches xy = 0.3, 0.3, width, height = 0.2, 0.5 p = mpatches.Rectangle(xy, width, height, facecolor="orange", edgecolor="red") plt.gca().add_patch(p) plt.draw() A Rectangle is a patch class and (although I'm not sure) I don't think

Re: [Matplotlib-users] Square Axes

2008-09-17 Thread Jae-Joon Lee
Adjusting a physical size of the axes is a bit tricky in matplotlib, as the axes has an fixed position in normalized figure coordinate. But, I guess setting the axes aspect ratio in physical size is doable relatively easily, at least if your x,y axis are in linear scales. For example, if you want

Re: [Matplotlib-users] axes and transData

2008-09-29 Thread Jae-Joon Lee
Hi, As far as I know, the destination coordinate of trans* is a display (canvas) coordinate, not the normalized figure coordinate. It has a dimension of f.get_figwidth()*f.get_dpi(), f.get_figheight()*f.get_dpi(). For example, transFigure transforms the normalized figure coordinate to the display

Re: [Matplotlib-users] vertical padding in legend

2008-09-30 Thread Jae-Joon Lee
Hello, I just had a quick look at this problem. And I'm posting a quick solution in case Christoper haven't dig it yet. Index: lib/matplotlib/legend.py === --- lib/matplotlib/legend.py(revision 6138) +++ lib/matplotlib/legend.py

Re: [Matplotlib-users] Plotting loop refuses to update display on OS X

2008-10-04 Thread Jae-Joon Lee
functions like raw_input blok the mianloop of some gui backends (e.g., gtk) but work fine with some other backend (although Tk is the only backend I know of). So my guess is that you used a different backend with 0.98.1. I guess you have a few options. * try different backend (Tk) with 0.98.3 *

Re: [Matplotlib-users] Clear Figure

2008-10-04 Thread Jae-Joon Lee
I guess you need to put draw() after plot() self.canvas.figure.clf() self.canvas.axes.plot([1.,2.,4.]) self.canvas.draw() Let us know if it does not help. -JJ On Sat, Oct 4, 2008 at 7:17 PM, rocha <[EMAIL PROTECTED]> wrote: > Hi Guys, > > I need to clear the Figure after the user has clicked

Re: [Matplotlib-users] vertical padding in legend

2008-10-05 Thread Jae-Joon Lee
> > Done, except that it just raises a warning, and still works with the old > kwarg. The new kwarg is "borderpad"; it is used if pad==0, which is the new > rc default. I set the default borderpad=0.5. > > There is still too much other positioning in legend that is based on axes > units. I brief

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

2008-10-09 Thread Jae-Joon Lee
The current legend class does not support multiple columns. Eric Wertman once mentioned in this list that he would work on this feature, but I don't know the current status. A (partial) rewrite of the legend class which I plan to support multicolumns is in my TODO list but I haven't started it yet.

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

2008-10-09 Thread Jae-Joon Lee
xandre Nalon <[EMAIL PROTECTED]> wrote: > Hello, > > Em Thursday 09 October 2008 13:46:52 Jae-Joon Lee escreveu: >> Meanwhile, you may try to make multiple legends as a posible workarounds. > > Thanks for your answer. That did the trick, and the figure > looks more or les

Re: [Matplotlib-users] no canvas reinitialization between calls to savefig

2008-10-31 Thread Jae-Joon Lee
I can reproduce Thomas' problem with Agg backend. It does not happen if frame_on is True. And I guess Thomas' guess in the first email might be right. I had a quick look at the mpl source and I don't think draw(), clf() or savefig() try to clear the canvas. The problem is not visible if frame_on i

Re: [Matplotlib-users] no canvas reinitialization between calls to savefig

2008-11-04 Thread Jae-Joon Lee
> I spent some time working on it and came to the following conclusion: > if the mpl figure is fully transparent, you see whatever is in the gui > rendering buffer, which may be unintiialized memory. In some sense, > mpl is doing what is asked of it, making a fully transparent figure. > Clearing

Re: [Matplotlib-users] Python 2.6

2008-11-08 Thread Jae-Joon Lee
I think the problem is caused by the image compositing logic in the Axes.draw() method. It currently makes a composite image first and then flip the resulting image if necessary. But I think what should happen is to flip the original images first and then do the compositing. So, test the attached

Re: [Matplotlib-users] Python 2.6

2008-11-08 Thread Jae-Joon Lee
> Hey Jae Joon -- thanks for looking into this. I don't have time to > test this patch, but I wanted to mention that there is an analogous > problem for figure image compositing -- see figimage_demo.py. agg > shows the correct behavior: the two images should be in the lower > left, and the blue s

Re: [Matplotlib-users] Python 2.6

2008-11-08 Thread Jae-Joon Lee
et me know if there are cases this patch does not work. -JJ On Sat, Nov 8, 2008 at 7:28 PM, John Hunter <[EMAIL PROTECTED]> wrote: > On Sat, Nov 8, 2008 at 6:10 PM, Jae-Joon Lee <[EMAIL PROTECTED]> wrote: > >> My original patch does not work for this case, becaus

Re: [Matplotlib-users] [IPython-user] 'pause' in order to cycle though a bunch of plots

2008-11-14 Thread Jae-Joon Lee
On Fri, Nov 14, 2008 at 5:20 PM, Gael Varoquaux <[EMAIL PROTECTED]> wrote: > On Fri, Nov 14, 2008 at 11:12:14AM -0800, Benjamin J. Racine wrote: >>I use pause in matlab to cycle through an interactive do-loop and view a >>bunch of plots in interactively... > >>Don't bother reproducing i

Re: [Matplotlib-users] Save a plot background

2008-11-17 Thread Jae-Joon Lee
I think the savefig() command calls draw() internally, doesn't it? So, I guess the restore_region() command comes before the draw() call, i.e., it has no effect for the saved figure. One way I can think of is to save the agg buffer without redrawing it. It seems work. --- imp

Re: [Matplotlib-users] plt.gca().get_frame().set_linewidth

2008-11-18 Thread Jae-Joon Lee
get_frame() is deprecated (it is supposed to show you a DeprecationWarning). Axes class now has a "frame" property, so gca().frame.set_linewidth(2) should work. Currently get_frame() returns Axes.patch which is used to draw a axes background. -JJ On Tue, Nov 18, 2008 at 12:24 PM, Christopher

Re: [Matplotlib-users] Axis lines crossing in them middle of the plot

2008-11-18 Thread Jae-Joon Lee
On Tue, Nov 18, 2008 at 9:20 AM, John Hunter <[EMAIL PROTECTED]> wrote: > > > There are two related problems here: one easier, one harder. We can > start with the easier one. The easy one is to have a "detachable > axis". Right now we have one on the right and one on the left for the > x-axis.

Re: [Matplotlib-users] Two questions regarding axis scaling

2008-11-23 Thread Jae-Joon Lee
> > What if I wanted one legend with both entries in it, rather than two > separate legends with a different entry in each? Is that possible? That's > more desirable than two separate legends. > Check http://www.nabble.com/displaying-a-legend-from-a-different-subplot-td18447966.html#a18447966 Th

Re: [Matplotlib-users] Font sizes for web application

2008-11-30 Thread Jae-Joon Lee
On Mon, Dec 1, 2008 at 12:56 AM, Jesper Larsen <[EMAIL PROTECTED]> wrote: > Hi Matplotlib users, > > I have a web application in which I would like to scale the plots down > if the users horizontal screen size is less than 800. Currently only > the plot is scaled while the fonts are fixed in size (

Re: [Matplotlib-users] fancy patch formatting breaking tex document

2008-12-08 Thread Jae-Joon Lee
John, I remember that "-" is also rendedered as a dot in the HTML output. Using "\-" instead of "-" seems to work. But, I'm afraid that the help (or similar) command, which I frequently use in interactive sessions, may show "\-" instead of "-". So, quoting seems to be a best option to me. Regar

Re: [Matplotlib-users] different PNG and PDF output...

2008-12-16 Thread Jae-Joon Lee
I just found my previous message was only sent to Lebostein. Anyhow, here is my original meesage. On Tue, Dec 16, 2008 at 10:38 AM, Jae-Joon Lee wrote: > Yes, I can see the differences. > Anyway, it seems to me the differences are primarily caused by > different dpi, not by differen

Re: [Matplotlib-users] different PNG and PDF output...

2008-12-16 Thread Jae-Joon Lee
On Tue, Dec 16, 2008 at 12:17 PM, jkitchin wrote: > > I also observed this with eps output. The png looked fine, but the eps legend > was very large in my case. > > j > Hmm, it is not clear to me if this is a same issue. I think eps output is not very sensitive to dpi thing in matplotlib. I trie

Re: [Matplotlib-users] different PNG and PDF output...

2008-12-16 Thread Jae-Joon Lee
On Tue, Dec 16, 2008 at 4:02 PM, Jouni K. Seppänen wrote: > "Jae-Joon Lee" writes: > >> So, Lebostein and j, if you know how to check out using svn, can you >> give a try either the svn trunk or the maintenance branch? I'm >> attaching the patch just

Re: [Matplotlib-users] different PNG and PDF output...

2008-12-16 Thread Jae-Joon Lee
ps. John, are you releasing a new maintenance version? I'm afraid that my previous patch broke one of the example. Sorry, I thought the fix was obvious and didn't pay much attention. On Tue, Dec 16, 2008 at 5:18 PM, Jae-Joon Lee wrote: > On Tue, Dec 16, 2008 at 4:02 PM, Jouni K

Re: [Matplotlib-users] FancyArrowPatch without annotate

2008-12-16 Thread Jae-Joon Lee
Ken, On Wed, Dec 17, 2008 at 1:14 AM, Ken Schutte wrote: > This new FancyArrow stuff looks great, but I'm having trouble getting it to > work. All of the gallery examples I see seem to only use it thru an > 'annotate' call. I just want to draw these arrows directly. > > I tried the following, b

Re: [Matplotlib-users] FancyArrowPatch without annotate

2008-12-17 Thread Jae-Joon Lee
On Wed, Dec 17, 2008 at 9:09 AM, Ken Schutte wrote: > On Wed, Dec 17, 2008 at 1:49 AM, Jae-Joon Lee wrote: >> >> This is a correct way indeed. >> I believe that you considered it as a plain line because the arrow >> head is too small. >> You need to adjust

Re: [Matplotlib-users] legend: axespad, pad, handlelen, labelsep - without effect

2008-12-19 Thread Jae-Joon Lee
The legend class has been reimplemented recently and the name of some keyword arguments (and their meaning) has been changed. Those parameters you're using are deprecated ones. It is supposed to show you some warnings if deprecated parameters are used, so what you see is a bug. I'll take a look. I

Re: [Matplotlib-users] legend: axespad, pad, handlelen, labelsep - without effect

2008-12-19 Thread Jae-Joon Lee
te. I did my own test and it worked well for me, and I hope it does not cause any problem. Regards, -JJ On Fri, Dec 19, 2008 at 9:44 AM, John Hunter wrote: > On Fri, Dec 19, 2008 at 8:36 AM, Jae-Joon Lee wrote: >> The legend class has been reimplemented recently and the name of s

Re: [Matplotlib-users] FancyArrowPatch without annotate

2008-12-19 Thread Jae-Joon Lee
On Wed, Dec 17, 2008 at 1:19 PM, Ken Schutte wrote: > It might be nice if eventually there were extra styles, e.g. "-|>", "<|-|>" > for single lines with solid arrowheads This is now added in the trunk. -JJ -- _

Re: [Matplotlib-users] "No such attribute" error with PDF output

2008-12-20 Thread Jae-Joon Lee
It seems as a bug in the pdf backend, which can be fixed by the simple patch below. I didn't commit this fix as I think it would be better if original author (Jouni?) make sure this is a correct way. Neil, your code will work okay if you don't use hatch. Or, you may apply the patch by yourself. -J

Re: [Matplotlib-users] different PNG and PDF output...

2008-12-20 Thread Jae-Joon Lee
On Sat, Dec 20, 2008 at 6:02 PM, Lebostein wrote: > A little thing: the shadow of the legend box is not scaling with the dpi. > For example with 300 dpi I can't discover the shadow... This also should be fixed in the maintenance branch and the trunk. Thanks for reporting. -JJ --

Re: [Matplotlib-users] (no subject)

2008-12-20 Thread Jae-Joon Lee
On Sat, Dec 20, 2008 at 8:52 AM, jouni k seppänen wrote: > Also the patch demo or some unit test > should cover that branch of the code, > ie the case when more than one patch > has the same hatch pattern. I just check in the patch with a slight change in the hatch_demo.py Regards, -JJ -

Re: [Matplotlib-users] Absolute spacing for embedded figure

2008-12-22 Thread Jae-Joon Lee
On Sun, Dec 21, 2008 at 1:30 PM, Georg Brandl wrote: > Hi, > > I'm currently using Qwt to display a plot in a GUI application, but I'd like > to replace it with matplotlib and a shell window, so that the user can not > only view the plot but also modify it in-place using pyplot commands. > > One t

Re: [Matplotlib-users] Legend in X coordinates

2008-12-30 Thread Jae-Joon Lee
The exact location of the legend is known at drawing time. Thus, the location of the text needs to be calculated at the drawing. I may help you with this but it is quite tricky and you need some knowledge on internals of the mpl. Or, you may simply draw the figure twice (with same renderer), where

Re: [Matplotlib-users] clabel return values

2009-01-06 Thread Jae-Joon Lee
I guess you're missing vertical and horizontal alignment. Also, your font properties were not set correctly. The 4th argument of the text function is a color. fontdict2 = {'fontweight':'light', 'color': 'r', 'fontsize':fontsize} fp = FontProperties(fontdict2) labels = p

Re: [Matplotlib-users] clabel return values

2009-01-06 Thread Jae-Joon Lee
ize} > fp = matplotlib.font_manager.FontProperties(fontdict2) > > labels = plt.clabel(CS, inline=1, fontsize=fontsize,colors='k') > for label in labels: > ltext = label.get_text() > lx,ly = label.get_position() > lrot=label.get_rotation() > va, ha = label

Re: [Matplotlib-users] set axes size; figure adjusts

2009-01-12 Thread Jae-Joon Lee
> > The best I've come up with so far is to > create a figure with a set size, and then > add axes with a specified rectangle. > But this does not give a neat path to > what I want. > Alan, I think the way you're doing is the easiest way. Anyhow, can you provide an example of a "neat path"? In my

Re: [Matplotlib-users] set axes size; figure adjusts

2009-01-12 Thread Jae-Joon Lee
> > For my current use it would be enough if savefig had an option > bbox = 'tight' > so that only the area actually drawn in was written > to file. > > The problem is that if you set the fig size and then > set the axis size proportionately, you must fiddle > with things to get a tight fit

Re: [Matplotlib-users] scale the legend

2009-01-14 Thread Jae-Joon Lee
If you use recent version of mpl, the size of the overall legend should scale with the font size. See below, import matplotlib.font_manager prop = matplotlib.font_manager.FontProperties(size=5) lagend(prop=prop) Just in case, my preference in your case is to move the legend outside of the axes ar

Re: [Matplotlib-users] Vertical alignment of a text

2009-01-14 Thread Jae-Joon Lee
Take a look at http://matplotlib.sourceforge.net/users/text_props.html But I guess MPL's functionality is somewhat limited compared to PyX, especially in multiline support. -JJ On Wed, Jan 14, 2009 at 1:13 PM, wrote: > Hello, > is there a similar functionnality to the one given by PyX here

Re: [Matplotlib-users] Vertical alignment of a text

2009-01-14 Thread Jae-Joon Lee
e solution. Regards, -JJ ps. Please CC the mail to the list also. On Wed, Jan 14, 2009 at 1:28 PM, wrote: > In fact I would like to know depth of a single formula. dvipng gives that > kind of information. > > Thanks. > > > Message d'origine >>Date: Wed,

Re: [Matplotlib-users] Vertical alignment of a text

2009-01-15 Thread Jae-Joon Lee
va="baseline" does not work? -JJ On Thu, Jan 15, 2009 at 3:05 AM, wrote: >>Dimension of a text in mpl is renderer-dependent in general. >>Each renderer has "get_text_width_height_descent" method which returns >>width, height, and descent of the given text. >>If you're only interested in latex-

Re: [Matplotlib-users] Vertical alignment of a text

2009-01-15 Thread Jae-Joon Lee
I presume that you're only interested in the math formula, and not in any other graphical functionality of MPL. You may use mathtext module directly in that case. from matplotlib.mathtext import MathTextParser p = MathTextParser("bitmap") filename, texstr = "test.png", r"$\alpha$" p.to_png(filen

Re: [Matplotlib-users] zorder with twinx grid

2009-01-18 Thread Jae-Joon Lee
twinx makes a separate axes and zorders are only meaningful within a same axes. Because ax2 is added to the figure later than the original axes, artists in ax2 are always above others. I don't think there is an easy way to make zorder work between several axes, unless you somehow merge them into a

Re: [Matplotlib-users] Scale subplot plots?

2009-01-18 Thread Jae-Joon Lee
I'm afraid that you may not be able to do those with the subplot. If you want a fixed size axes, you need to manually calculate the axes position (in normalized figure coordinates) using the figure size. You may use my helper class which support a fixed-size axes. http://dl.getdropbox.com/u/1787

Re: [Matplotlib-users] unfilled markers?

2009-01-25 Thread Jae-Joon Lee
> > Norbert, > > It did, thank you! One question, though: when I originally tried > something like this, it didn't work, because it was treating pl as a list > and giving me the error of > "list object has no attribute 'set_mec()'" Why does the addition of the > comma to pl allow it to see it a

Re: [Matplotlib-users] bounding box again

2009-01-26 Thread Jae-Joon Lee
As Jouni suggested, the frameon argument needs to be applied to the figure, not to the axes (or subplot). Regards, -JJ On Mon, Jan 26, 2009 at 10:54 AM, Willi Richert wrote: > Hi, > > in my version 0.98.5 frameon=False (as a subplot argument) just omits the > black lines at the x and y axes. T

Re: [Matplotlib-users] unable to create legend for vlines graph

2009-01-28 Thread Jae-Joon Lee
This is a bug introduced in the recent version of MPL. While it is fixed in the maintenance branch, there is no release yet. You may 1) try the svn version or 2) apply the patch by yourself. http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/v0_98_5_maint/lib/matplotlib/legend

<    1   2   3   4   5   6   7   8   9   >