Re: [Matplotlib-users] why legend does not show in matplotlib-1.2.1 & py2.7

2013-05-23 Thread Jae-Joon Lee
I do not have any access to mpl 0.98 so I cannot tell for sure. My guess is that you have been using a feature that has not been intended, that has fixed at some point. The first argument to legend should be a list of artists. And pie2010 is a tuple of a list of patches and a list of texts, i.e., t

Re: [Matplotlib-users] tight_layout and ImageGrid

2013-05-08 Thread Jae-Joon Lee
ImageGrid creates axes for colobar even if cbar_mode=None. These axes for colorbar are set to invisible, so usually they are harmless. tight_layout, however, do not care whether the axes is visible or not, and the warning is because of these "invisible" axes for colorbars. For comparison, if you tu

Re: [Matplotlib-users] hammer projection

2013-05-01 Thread Jae-Joon Lee
The code below uses axisartist toolkit. http://nbviewer.ipython.org/5467593 This is modified from 3rd example from the below example. http://matplotlib.org/examples/axes_grid/demo_floating_axes.html I hope this helps. Regards, -JJ On Tue, Apr 23, 2013 at 11:17 PM, Marian Jakubik wrote: >

Re: [Matplotlib-users] black and hatched legend handle

2013-05-01 Thread Jae-Joon Lee
You need to create a new handler. I guess the code below is close to what you want. I hope this helps. http://nbviewer.ipython.org/5495680 Regards, -JJ On Wed, May 1, 2013 at 5:24 AM, mgurling wrote: > I'm trying to make a legend handle that is half black and half hatched. > I've > tried ..

Re: [Matplotlib-users] AnchoredSizeBar Color

2013-04-16 Thread Jae-Joon Lee
The anchored_artists needs improvements and things are still opaque. For now you can do something like below, ``` a = AnchoredSizeBar(ax.transData, 0.1, "test", loc=8, pad=0.1, borderpad=0.1, sep=2, prop=None, frameon=False) rect = a.size_bar._children[0] re

Re: [Matplotlib-users] Trouble with legend and axis scaling

2013-03-27 Thread Jae-Joon Lee
The first issue is a bug, and I opened a PR that fixes this. https://github.com/matplotlib/matplotlib/pull/1864 In the comments of the PR, you can find a workaround. Regards, -JJ On Wed, Mar 27, 2013 at 11:09 PM, Hackstein wrote: > Sterling, > > I'm using matplotlib version 1.2.0 with agg

Re: [Matplotlib-users] Squashed axes with AxesGrid

2013-03-21 Thread Jae-Joon Lee
It is not clear what your problem is. AxesGrid implicitly assumes aspect=1 for each axes. So, I guess your y-limits are smaller (in its span) than x-limits. If you don't want this behavior, there is no need of using the AxesGrid. Rather use Grid, or simply subplots. import matplotlib.pyplot as plt

Re: [Matplotlib-users] removing paths inside polygon

2013-03-19 Thread Jae-Joon Lee
On Wed, Mar 13, 2013 at 2:17 AM, Andrew Dawson wrote: > You should see that the circle is no longer circular, and also there are > weird line width issues. What I want it basically exactly like the attached > without_clipping.png but with paths inside the circle removed. The reason that circle

Re: [Matplotlib-users] I cannot change the axis tick separation or nbins in Axis artist

2013-02-21 Thread Jae-Joon Lee
AxisArtist utilizes a different (compared to the vanilla matplotlib) mechanism for determining tick location etc., so some of the matplotlibcommands do not work. Unfortunately, AxisArtist is still not well documented, and things are often opaque. Below I implemented a method that you can use to con

Re: [Matplotlib-users] Problem with PatchCollection and FancyArrowPatch?

2013-01-31 Thread Jae-Joon Lee
FancyArrowPatch behaves quite differently from normal patches. Most importantly, the path must be reevaluated during the drawing time, so a normal PatchCollection, which evaluate the paths during the instance creation, won't work. i.e., you need a new Collection class. Below is a very incomplete i

Re: [Matplotlib-users] CMYK

2013-01-30 Thread Jae-Joon Lee
I agree with Eric that what we need is a backend that support CMYK color space. But matplotlib may need to provide some framework for handling the color profiles etc. My limited experience with ps_myck backend ( https://github.com/leejjoon/mpl_ps_cmyk) suggests that, as far as matplotlib provide s

Re: [Matplotlib-users] FancyArrowPatch to edge of marker with known size?

2013-01-30 Thread Jae-Joon Lee
On Wed, Jan 30, 2013 at 7:11 AM, Skipper Seabold wrote: > Say I have a marker with a known size in points and I want to draw an > arrow to this point. How can I get the ends points for the arrow? As you > can see in the below, it overlaps the markers. I want to go to the edge. I > can use shrinkA

Re: [Matplotlib-users] Subaxes deletion issue

2013-01-28 Thread Jae-Joon Lee
The divider thing from axes_grid toolkit is primarily designed for a static layout. So, it may become quite tricky when you want to adjust the layout dynamically. Here is a modified version your code that I think does what you want. from matplotlib.figure import Figure from mpl_toolkits.axes_grid

Re: [Matplotlib-users] Baseline of TeX fonts

2013-01-28 Thread Jae-Joon Lee
I guess you have text.usetex=True? In this case, the baselines are not correct unless you also set "text.latex.preview" as True. For example, try to add following line in your rc file. text.latex.preview : True (You also need preview.sty installed) If this does not solve the problem, please post

Re: [Matplotlib-users] dpi

2012-10-18 Thread Jae-Joon Lee
> Yeah, that's what I feared. But in the mean time, are there any best > practices to minimize undesired effects like the one above? For example, > are there any other functions that need special parameters to not raster > their output when writing to a vector format? And is there a way to get > a

Re: [Matplotlib-users] Clipping Contours

2012-10-18 Thread Jae-Joon Lee
On Tue, Oct 16, 2012 at 4:04 PM, T J wrote: > I'm interested in clipping the result of plt.contour (and > plt.contourf) to a patch. However, QuadContourSet does not have a > set_clip_path() method. Is there a way to do this? QuadContourSet does not (I think it should), but LineCollection instan

Re: [Matplotlib-users] dpi

2012-10-11 Thread Jae-Joon Lee
On Fri, Oct 12, 2012 at 3:39 AM, Nikolaus Rath wrote: > matplotlib actually rescales the raw imshow data when saving to a vector > format? Why is that? I think it should embed the bitmap with full > resolution in the vector file and rely on the consumer of the vector > file to scale it to whatever

Re: [Matplotlib-users] Image as marker and axes "equal" aspect ratio

2012-09-22 Thread Jae-Joon Lee
I recommend you to use OffsetImage. Here is an example of how one can use OffsetImage. http://matplotlib.org/examples/pylab_examples/demo_annotation_box.html And attached is the modified version of the original script. Regards, -JJ image_in_axes.py Description: Binary data ---

Re: [Matplotlib-users] Fwd: zoomed in detail box

2012-09-12 Thread Jae-Joon Lee
jor_locator(MaxNLocator(3)) > > mark_inset(ax,axins,loc1=1,loc2=3, fc="none", ec="0.5") > > p.draw() > p.show() > --- > The "bbox_to_anchor" label is supposed to move the zoomed axis, but it does > n

Re: [Matplotlib-users] axes_grid1.inset_axes frame background color

2012-09-05 Thread Jae-Joon Lee
There is no easy way to do it (the extent of axes including the labels is determined only when the plot is drawn). And most straight forward way is to define your own artist. Attached is an one example of such artist. I think it is good to have such an artist class in matplotlib and I may able to p

Re: [Matplotlib-users] FancyBBox set_width

2012-09-04 Thread Jae-Joon Lee
On Sun, Aug 19, 2012 at 3:41 PM, Peter Combs wrote: > It seems like draw()ing the text object will reset the size of the BBox... > Any idea how to fix this? At the moment, I'm experimenting with continually > drawing, polling the get_width() method, and when it's too small, adding in > spaces arou

Re: [Matplotlib-users] Fwd: zoomed in detail box

2012-09-04 Thread Jae-Joon Lee
On Mon, Aug 20, 2012 at 10:50 PM, darkside wrote: > I am using zoomed_inset_axes, but the default position overlaps the yticks > and the parent axe ticks, so I am trying: > axins = zoomed_inset_axes(ax, > 3,bbox_to_anchor(0.5,1),bbox_transform=ax.figure.transFigure, loc=2) This is supposed to wor

Re: [Matplotlib-users] Problems with rasterizing multiple elements

2012-09-04 Thread Jae-Joon Lee
I recommend you to use LineCollection as it is rasterized as a single image. For example, from matplotlib.collections import LineCollection d = [np.array([ts[0], ys1]).T for ys1 in ys] lc = LineCollection(d, color='r', lw=0.5, alpha=0.5, rasterized=True) ax.add_collection(lc)

Re: [Matplotlib-users] Legend Marker Color Bug

2012-09-04 Thread Jae-Joon Lee
On Wed, Sep 5, 2012 at 6:05 AM, Sterling Smith wrote: > I still do not get black markers. Furthermore, if you try to make a new > legend with the result of leg.get_lines(), you will get lines without > markers, which leads me to the conclusion I stated in my previous email > (which you did not

Re: [Matplotlib-users] Getting tight layout to recognize the second axis via twinx()

2012-08-29 Thread Jae-Joon Lee
On Wed, Aug 29, 2012 at 4:52 PM, Eric Firing wrote: > twinx and twiny probably will need to return SubplotBase > instances if their parent is a SubplotBase instance. My take on this. https://github.com/matplotlib/matplotlib/pull/1169 And, tight_layout seem to work okay with this change. Regard

Re: [Matplotlib-users] path effects question

2012-07-17 Thread Jae-Joon Lee
I think it is me who put that code there. But I cannot recall why I did it. I may have copied that behavior from other code, but cannot find which. Yes, I agree that the current behavior is not very desirable. So, anyone who have an idea how this should behave, please go ahead and fix this. Regar

Re: [Matplotlib-users] Bug in legend?

2012-04-18 Thread Jae-Joon Lee
Handling alpha can become very tricky with matplotlib. The problem is not specific for legend thing, but how attribute of patches are updated when the update_from method is called. Here is an example. from matplotlib.patches import Patch pa1 = Patch(alpha=None, fc='none', ec='b') pb1 = Pat

Re: [Matplotlib-users] FancyArrowPatch -|> style doesn't have solid arrowhead when linestyle='dashed'

2012-04-15 Thread Jae-Joon Lee
Unfortunately, this is something that I haven't considered when implementing the FancyArrowPatch. As you may know, FancyArrowPatch is a single patch object (at least viewed from outside), so you cannot have multiple linestyles that can be set by users. So, one option is to change the implementatio

Re: [Matplotlib-users] Taylor diagram (2nd take)

2012-03-26 Thread Jae-Joon Lee
On Wed, Feb 22, 2012 at 12:10 AM, Yannick Copin wrote: > after iterating with Michael A. Rawlins over my previous attempt to code a > Taylor diagram (see [1]), here's a new version of my code, along with an > example plot. Maybe it could make its way into the gallery as an example of > Floating Ax

Re: [Matplotlib-users] Arrow with a dashed line

2012-03-26 Thread Jae-Joon Lee
Just to clarify, both arrowstyle='simple' and arrowstyle='-|>' draw arrows as patches. In your first example with arrowstyle='simple', the arrow is drawn as filled patch without edges, i.e., linestyle is not effective. arrowstyle="-|>" also uses a patch but no "fill", only "stroke". Regards, -JJ

Re: [Matplotlib-users] move legend to the foreground: how to use set_zorder() correctly?

2012-03-26 Thread Jae-Joon Lee
zorders are only meaningful among objects in a same axes. An easy workaround is to move the legend in ax1 to ax2. ax2.add_artist(leg1) ax1.legend = None Regards, -JJ On Thu, Mar 22, 2012 at 10:13 PM, David Verelst wrote: > Hi All, > > I am plotting on two different y-axes: one on the

Re: [Matplotlib-users] custom markers from images?

2012-03-10 Thread Jae-Joon Lee
One way to use images as a marker would be to use offsetbox module. Here is an example adopted from http://matplotlib.sourceforge.net/examples/pylab_examples/demo_annotation_box.html Regards, -JJ import matplotlib.pyplot as plt from matplotlib.offsetbox import OffsetImage, AnnotationBbox from

Re: [Matplotlib-users] Centering Text with axes_divider

2012-03-10 Thread Jae-Joon Lee
I wonder why the simple text command does not work for you? e.g., def add_center_text(ax): ax.text(0.5, 0.9075, "Centered Title", ha='center', va='center', fontsize=18, bbox=dict(boxstyle='round, pad=0.5, rounding_size=0.25', fc="white", ec="k", lw=2),

Re: [Matplotlib-users] [SciPy-User] matplotlib: Simple legend code no longer works after upgrade to Ubuntu 11.10

2012-03-04 Thread Jae-Joon Lee
Although this is quite an old post, one need to set the location again. e.g., lh._loc = 2 Regards, -JJ On Wed, Dec 14, 2011 at 12:09 AM, Warren Weckesser wrote: > > > On Mon, Dec 12, 2011 at 7:05 PM, C Barrington-Leigh > wrote: >> >> Oops; I just posted this to comp.lang.python, but I wonde

Re: [Matplotlib-users] Dynamic adjustment of axis position and size in figure

2012-03-03 Thread Jae-Joon Lee
tight_layout only works for instances of Subplots. However, ax2, which is created by calling twinx, is an instance of Axes, and is not accounted by the tight_layout command.It may be possible to improve the situation, I doubt it would be easy as the association between ax1 and ax2 is not very expli

Re: [Matplotlib-users] Dynamically adjusting the color scale in NonUniformImage

2012-02-19 Thread Jae-Joon Lee
As far as I can see, this is a bug of matplolib, although calling a set_data work around this. Can you open a bug report in our github repo? -JJ 2012. 2. 18. 오후 10:12에 "Ray Osborn" 님이 작성: > You're exactly right. That does fix it. Unfortunately, it means I have to > refactor some of my code becau

Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-08 Thread Jae-Joon Lee
What can be done with the current Matplotlib is to use the offset boxes. Here is a modified version of a code snippet from http://abitofpythonabitofastronomy.blogspot.com/2009/05/mpl-multicolor-text.html Regards, -JJ from matplotlib.offsetbox import HPacker, TextArea, AnnotationBbox f = fig

Re: [Matplotlib-users] Why pixel marker size is 4 pixels?

2012-02-06 Thread Jae-Joon Lee
) > [/CODE] > > Here is how I identify the problem: > 1. use the above script to plot on screen > 2. savefig("plot.png") > 3. open plot.png in GIMP and check the pixel size. > > I also attached the two PNG files generated with Agg and Cairo backends. > > >

Re: [Matplotlib-users] Why pixel marker size is 4 pixels?

2012-02-05 Thread Jae-Joon Lee
How are you plotting your points. If you use *plot*, there is a *markersize* parameter. If you use *scatter*, the third argument controls the marker size. But you may actually complaining about other issues, e.g., antialiasing, etc. So, if above are not your answer, please post a complete example

Re: [Matplotlib-users] legend not draggable when secondary y-axis present

2012-02-05 Thread Jae-Joon Lee
For the legend to be picked by mouse, it must be placed in the top most axes. ax = subplot(111) l1, = ax.plot([1,3,2]) ax2 = ax.twinx() lab = ax2.legend([l1], ["test"]) I hope this clarifies your issue. If not, please post a simple but complete example that demonstrates your problem. Regards, -

Re: [Matplotlib-users] many plots

2012-02-05 Thread Jae-Joon Lee
On Sat, Feb 4, 2012 at 1:27 AM, Saurav Pathak wrote: > Is there another way to do this more efficiently? I recommend you to use LineCollection, which should be much efficient. http://matplotlib.sourceforge.net/examples/api/collections_demo.html Regards, -JJ ---

Re: [Matplotlib-users] problem finding axes_grid1

2012-01-31 Thread Jae-Joon Lee
I believe the matplotlib package in ubuntu 10.4 is v0.99.1, which does not include axes_grid1. You need to install newer version of matplotlib. Regards, -JJ On Mon, Jan 30, 2012 at 3:58 AM, BG wrote: > Hello all, > > I'm new to using Matplotlib.  I am on Ubuntu 10.4, and I installed through

Re: [Matplotlib-users] use legend's 'best' location for a text box

2012-01-13 Thread Jae-Joon Lee
As far as I know, No, there is no such way inside matplotlib that does that for you. But, in theory, it should not be very difficult to implement. Can you open a new issue on our github page? Regards, -JJ On Thu, Jan 12, 2012 at 4:16 AM, Craig the Demolishor wrote: > Hi, >   I'm drawing a his

Re: [Matplotlib-users] tailwidth?

2012-01-12 Thread Jae-Joon Lee
I know this is an old post, but just in case. For arrowstyle="<->", they are just lines (well, not exactly as a matter of fact). So, what you need is to change their linewidths. You may do arrow1=pylab.annotate("", xytext=(0.1,0.1),                       xy=(0.9,0.9),fontsize=8, arrowprops=dict

Re: [Matplotlib-users] draw bbox around axes title

2012-01-07 Thread Jae-Joon Lee
On Fri, Jan 6, 2012 at 4:56 AM, Skipper Seabold wrote: > but when I call show, it seems the width of > the box is reset. Yes. Because the location of the texts are backend-dependent, the location of the xbox surrounding the text are recalculated during the drawing time. I don't think there is no

Re: [Matplotlib-users] Colorbar on each subplot

2012-01-07 Thread Jae-Joon Lee
Please post a complete (but simple) example that we can easily test. Doing the *subplot_adjust* will mess up the location of colorbars, but I believe that colorbars should be still there. If you're using v1.1 and later, see if using the "use_gridspec" parameter works. For example, colorbar(use_gri

Re: [Matplotlib-users] patheffects for Line2D objects

2012-01-02 Thread Jae-Joon Lee
I just opened a pull request that implements the requested feature. https://github.com/matplotlib/matplotlib/pull/655 If you're familiar with Git, please test it and see if it works for your need. I believe I will merge this PR to the master branch in a few days unless there is any objection. Re

Re: [Matplotlib-users] problem with annotate

2011-12-07 Thread Jae-Joon Lee
Can you post an standalone example? Maybe you want to set the *annotation_clip* parameter to False? http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.annotate Regards, -JJ On Fri, Dec 2, 2011 at 10:19 PM, Neal Becker wrote: > Using horizontalalignment='right', it seems t

Re: [Matplotlib-users] Inconsistent marker/line zorder in errorbar legend

2011-12-07 Thread Jae-Joon Lee
I just pushed a change that I believe fixes this problem https://github.com/matplotlib/matplotlib/commit/96caca8dd48d08e3106337ecdeae82fa0236b86b Required change is very minor, so you may apply the patch by yourself. If you need a workaround, let me know. Regards, -JJ On Tue, Dec 6, 2011 at 11

Re: [Matplotlib-users] Relpos only works once when using FancyArrow for annotation

2011-11-29 Thread Jae-Joon Lee
On Mon, Nov 28, 2011 at 10:49 PM, Jae-Joon Lee wrote: > This is a bug. In the current implementation, "annotate" has a > side-effect that modifies the arrowprops dictionary. For a future reference, this should now be fixed in the v1.1.x branch which also has been merged into t

Re: [Matplotlib-users] Relpos only works once when using FancyArrow for annotation

2011-11-28 Thread Jae-Joon Lee
On Mon, Nov 28, 2011 at 9:39 PM, Markus Baden wrote: > anno_args = { >     'annotation_clip': False, >     'arrowprops': dict(arrowstyle='-', relpos=(0, 1)), >     } > plt.annotate('Good relpos', (3, 3), xytext = (3, 2), **anno_args) > plt.annotate('Bad relpos', (6, 6), xytext = (6, 5), **anno_arg

Re: [Matplotlib-users] axes_grid1 and colorbar ticks

2011-11-16 Thread Jae-Joon Lee
This seems to be a bug that need to be fixed. Meanwhile, use "locator" parameter as below. cbar = grid.cbar_axes[0].colorbar(im, locator=ticks) Regards, -JJ On Thu, Nov 17, 2011 at 5:35 AM, Yoshi Rokuko wrote: > does someone knows how to specify ticks for a colorbar > inside axesgrid? the fol

Re: [Matplotlib-users] Separate formatting for tick labels

2011-11-16 Thread Jae-Joon Lee
Try something like this. ax = subplot(111) LabelsList = ['Prospero', 'Miranda', 'Caliban', 'Ariel'] ax.set_xticks(range(len(LabelsList)))xlabels = ax.set_xticklabels( LabelsList, rotation=35, horizontalalignment='right', fontstyle='italic', fontsize='10') ticklabels = ax.get_xticklabels()ticklabel

Re: [Matplotlib-users] Certain annotation parameters cause strange error

2011-11-03 Thread Jae-Joon Lee
I believe I fixed this in this pull request. https://github.com/matplotlib/matplotlib/pull/566 Unfortunately, I don't think there is a easy workaround other than not using the "fancy" arrow style. Regards, -JJ On Sun, Oct 30, 2011 at 1:51 PM, Brendan Barnwell wrote: >        I encountered a

Re: [Matplotlib-users] Figure legend for 1.1.0 doesn't properly handle errorbars?

2011-10-17 Thread Jae-Joon Lee
Somehow, Figure.legend flattens the given handle list and this is the cause of the problem. https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/figure.py#L994 Does anyone know why this is necessary? I just filed a pull request to remove this. https://github.com/matplotlib/matplot

Re: [Matplotlib-users] question about tight_layout()

2011-10-16 Thread Jae-Joon Lee
On Mon, Oct 17, 2011 at 1:03 AM, C M wrote: > - Error if I call self.panel.Layout() before I call tight_layout(). In my system, I don't see any error whether ` self.panel.Layout() is in or not. > - If I don't do this, no error, but it still isn't doing a proper tight > layout. > Your script DO

Re: [Matplotlib-users] question about tight_layout()

2011-10-16 Thread Jae-Joon Lee
On Sun, Oct 16, 2011 at 1:55 PM, C M wrote: > However, I can't get it to work correct with Figure.  I'm either getting > that same error or failure to adjust the Figure's size to accommodate the > axes' labels.  I attach a minimal runnable sample that demonstrates these > problems for those that e

Re: [Matplotlib-users] question about tight_layout()

2011-10-15 Thread Jae-Joon Lee
Figure.tight_layout() is a correct way. Do you see that error only when you use Figure.tight_plot (and not when you use plt.tight_layout)? What happen you try the script below. import matplotlib.pyplot as plt fig = plt.figure(1)ax = fig.add_subplot(111)fig.tight_layout() Regards, -JJ On Sat, O

Re: [Matplotlib-users] rotating x tick labels, bold labels with axislines toolkit???

2011-10-05 Thread Jae-Joon Lee
On Wed, Oct 5, 2011 at 11:50 AM, mdekauwe wrote: > Still haven't worked out the bold but I am sure there will be something on > that page > Try ax.axis["bottom"].label.set_text("Test") ax.axis["bottom"].label.set_weight("bold") IHTH, -JJ ---

Re: [Matplotlib-users] twinx problem

2011-10-03 Thread Jae-Joon Lee
On Tue, Oct 4, 2011 at 4:22 AM, Christopher Brown wrote: >     tick.label1.set_color('red') > You should use tick.label2, not tick.label1. tick.label2.set_color('red') Anyhow, as Eric said, it is strongly advised to use the tick_params method. -JJ -

Re: [Matplotlib-users] Using labels with "twinx()"

2011-09-28 Thread Jae-Joon Lee
On Wed, Sep 28, 2011 at 3:32 PM, Klonuo Umom wrote: > How to deal with this, without manually positioning legends and if possible > including all annotated plot lines in one legend? *twinx* creates a new axes. Thus there are TWO axes, and you need to do some manual adjustment. I believe that the

Re: [Matplotlib-users] Drawing on a figure, not a subplot

2011-09-17 Thread Jae-Joon Lee
On Sat, Sep 17, 2011 at 6:10 AM, John Ladasky wrote: > But that isn't my goal here.  I want to add lines to the FIGURE, outside > of any Axes.  Does anyone know how to accomplish this?  Thanks! Not sure what you mean here. Adding a patch to an axes does not mean it cannot be drawn outside of axes

Re: [Matplotlib-users] bug report and fix for bracket arrow (annotations)

2011-09-17 Thread Jae-Joon Lee
Thanks for reporting this. This is now fixed in the v1.0.x-maint branch and the master branch. Regards, -JJ On Sat, Sep 17, 2011 at 10:33 AM, Daniel Hyams wrote: > In  http://matplotlib.sourceforge.net/users/annotations_guide.html , > about 1/3 of the way down, there is a little demonstrator f

Re: [Matplotlib-users] GridSpec has unecpected effect

2011-09-17 Thread Jae-Joon Lee
Thanks for reporting this. I opened a pull request that I believe fixes this problem. https://github.com/matplotlib/matplotlib/pull/472 Please test this if you can. Depending on your need, you may work around this by calling all the set_position method always after all the GridSpec.update call.

Re: [Matplotlib-users] cross hatching in contours?

2011-09-17 Thread Jae-Joon Lee
On Thu, Sep 15, 2011 at 10:33 PM, Jonathan Slavin wrote: > I'm wondering if there is some way to do cross hatching as a way to fill > contours rather than colors (using contourf).  The only references to > cross hatching I see in the documentation are for patches type objects. > As far as I can te

Re: [Matplotlib-users] draggable annotation bug and fix

2011-09-16 Thread Jae-Joon Lee
Thanks for reporting this. This is now fixed in the v1.0.x-maint branch and in the master branch. Regards, -JJ On Fri, Sep 16, 2011 at 9:43 AM, Daniel Hyams wrote: > There seems to be a problem with the draggable annotation code when > the annotation is just clicked, and not dragged.  If you r

Re: [Matplotlib-users] Suggestion for annotation arrow clipping

2011-09-14 Thread Jae-Joon Lee
On Mon, Sep 12, 2011 at 3:20 AM, Daniel Hyams wrote: > I would suggest the following modification to Annotation.draw in > text.py.  All it does is set a clip box so that the annotation and > arrow is still drawn, but the arrow is clipped at the axes boundary. > It is a much nicer effect than the a

Re: [Matplotlib-users] superimposition of Cartesian projection axis on a polar axis on the same position

2011-09-14 Thread Jae-Joon Lee
On Thu, Sep 15, 2011 at 5:08 AM, Youngung Jeong wrote: > but since contour function does not plot on the polar coordinate system I think this is not True, but I may misunderstood you. Can you post an example that does not work? Here is a simple example that shows it does work. But I hardly use po

Re: [Matplotlib-users] superimposition of Cartesian projection axis on a polar axis on the same position

2011-09-14 Thread Jae-Joon Lee
On Thu, Sep 15, 2011 at 6:18 AM, Benjamin Root wrote: > There are some ways to do this, but I haven't tried them myself. > > http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/axislines.html > > Ben Root > You may better stick to the subplot with polar projection if your original data

Re: [Matplotlib-users] superimposition of Cartesian projection axis on a polar axis on the same position

2011-09-14 Thread Jae-Joon Lee
On Thu, Sep 15, 2011 at 5:08 AM, Youngung Jeong wrote: > But it only gives one axis added to 'fig.axes'. > Is there any work-around? Or am I missing some other feature of matplotlib? Somehow, this is not clearly documented for the subplot command. You need to use label parameter to create multipl

Re: [Matplotlib-users] 2 x-axes

2011-09-11 Thread Jae-Joon Lee
On Sun, Sep 11, 2011 at 10:16 PM, Neal Becker wrote: > Yes, that's very helpful.  Just one thing.  How would I get a bit more bottom > margin on the main figure to leave more room for the extra axis? > > I'm using this as an example.  I experimented with plt.subplots_adjust, which > seems like it

Re: [Matplotlib-users] 2 x-axes

2011-09-11 Thread Jae-Joon Lee
Just in case, here is a version with "axes_grid1" toolkit. Note that axes_grid is kind of deprecated. Regards, -JJ import numpy as np import matplotlib.pyplot as plt import mpl_toolkits.axes_grid1 as axes_grid1 host = axes_grid1.host_subplot(111) hplt, = host.plot(np.random.rand(100)) from ma

Re: [Matplotlib-users] Figure clipping incorrectly ; specify whether clips horizontally or vertically

2011-09-07 Thread Jae-Joon Lee
On Wed, Sep 7, 2011 at 12:09 AM, Jeffrey Spencer wrote: > Can I specify horizontal or vertical clipping?? Or what is the best way to > get around this? my understanding is that the clipping is done with a "closed" path. so I don't think one can do such thing as horizontal clipping, etc. I guess o

Re: [Matplotlib-users] How to make an arrow all one color?

2011-09-06 Thread Jae-Joon Lee
In matplotlib, patches have two colors; facecolor and edgecolor. So, try something like this arrowprops=dict(facecolor=((0.549,0.176,0.0156)), edgecolor=(0.549,0.176,0.0156), shrink=0.02,width=1,headwidth=6,frac=0.05), Regards, -JJ On

Re: [Matplotlib-users] edge joinstyle on rectangles

2011-09-06 Thread Jae-Joon Lee
On Wed, Sep 7, 2011 at 12:47 AM, Jeffrey Blackburne wrote: > It would be nice to have. Since the patch edge seemed to be using a "round" > style and I wanted "miter", my workaround was just to use a separate step > plot to overlay the outline. But for more general cases (e.g., a bar plot not >

Re: [Matplotlib-users] contour's clabels overlap each other in an ImageGrid

2011-09-05 Thread Jae-Joon Lee
; > > The end result is that contour labels are placed almost outside of the grid, > with most of the area in the center being blank. I am pretty sure it has to > do with the way rcParams are set, but I have no idea why. Params I do need to > set are text.usetex, figure.dpi, an

Re: [Matplotlib-users] change font properties of legend title?

2011-08-31 Thread Jae-Joon Lee
On Thu, Sep 1, 2011 at 7:21 AM, Alan G Isaac wrote: > On 8/31/2011 5:48 PM, Alan G Isaac wrote: >> How can I change font properties of a legend title? > > > Related question: would it be a reasonable suggestion for > Legend.set_title to take a ``prop`` argument? > > Alan Isaac Can you file an git

Re: [Matplotlib-users] change font properties of legend title?

2011-08-31 Thread Jae-Joon Lee
l = legend() l.get_title().set_fontproperties(...) -JJ On Thu, Sep 1, 2011 at 6:48 AM, Alan G Isaac wrote: > How can I change font properties of a legend title? > > Thanks, > Alan Isaac > > -- > Special Offer -- Downloa

Re: [Matplotlib-users] adding custom legends to multicolored line

2011-08-22 Thread Jae-Joon Lee
You may use a proxy artist. http://matplotlib.sourceforge.net/users/legend_guide.html#using-proxy-artist for example, from matplotlib.lines import Line2D l1 = Line2D([], [], linewidth=3, color="r") l2 = Line2D([], [], linewidth=3, color="g") l3 = Line2D([], [], linewidth=3, color="b") legend([l

Re: [Matplotlib-users] Gridspec and shared y-axis label

2011-08-22 Thread Jae-Joon Lee
On Thu, Aug 18, 2011 at 5:53 PM, mogliii wrote: > 2) I want to make a shared y-axis label. I found this page: > http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label > But any additional axis I put before the gridspec axis is not shown in > the end. Is there a special proc

Re: [Matplotlib-users] contour's clabels overlap each other in an ImageGrid

2011-08-22 Thread Jae-Joon Lee
Can you post an simple self-contained script that reproduces your problem? I just tried something similar but could not reproduces your problem. Here is what I did, Also, what version of matplotlb are you using? Regards, -JJ import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.a

Re: [Matplotlib-users] ImageGrid, force grid boxes to be same size

2011-08-22 Thread Jae-Joon Lee
If you don't care about the aspect ratio at all, you can use aspect="auto". Check the thread below. http://old.nabble.com/Re%3A-Can-I-change-pixel-aspect-with-axes_grid-p32300471.html Regards, -JJ On Sat, Aug 13, 2011 at 5:01 AM, R. O'Gara wrote: > Hi, > From the attached figure, you can see

Re: [Matplotlib-users] Can I change pixel aspect with axes_grid

2011-08-20 Thread Jae-Joon Lee
If you want aspect="auto", this must also be set when you create ImageGrid. A simple example is attached. If you want a fixed aspect other than 1, it is doable but gets a bit tricky. Let me know if this is what you want. Regards, -JJ from mpl_toolkits.axes_grid1 import ImageGrid fig = plt.fig

Re: [Matplotlib-users] Gridspec and shared y-axis label

2011-08-18 Thread Jae-Joon Lee
On Fri, Aug 19, 2011 at 1:29 AM, mogliii wrote: > Looking back I must say that > http://matplotlib.sourceforge.net/api/gridspec_api.html#matplotlib.gridspec.GridSpecBase > is not very helpful. And it is very counter-intuitive to the Axes > dimension specification with location lower left and width

Re: [Matplotlib-users] mathtext in eps figures doesn't come out in pdf

2011-08-18 Thread Jae-Joon Lee
t becomes invisible in the > pdf. > > Jon > > On Wed, 2011-08-17 at 14:09 +0900, Jae-Joon Lee wrote: >> Can you post an output eps file so that we can take a look? >> Regards, >> >> -JJ >> >> >> >> On Wed, Aug 17, 2011 at 5:52 AM, Jonathan

Re: [Matplotlib-users] mathtext in eps figures doesn't come out in pdf

2011-08-16 Thread Jae-Joon Lee
Can you post an output eps file so that we can take a look? Regards, -JJ On Wed, Aug 17, 2011 at 5:52 AM, Jonathan Slavin wrote: > Hi all, > > I've been making figures for a paper I'm writing (to be submitted to the > ApJ).  I'm using LaTeX and so need to use encapsulated PostScript for > the

Re: [Matplotlib-users] Subplot of subplots.

2011-08-11 Thread Jae-Joon Lee
There are a few options you can try. And I recommend you to use gridspec module. http://matplotlib.sourceforge.net/users/gridspec.html It can also be used with ImageGrid (at least in the master branch, but not sure for 1.0.1 release). I'm attaching a sample script. Regards, -JJ On Sat, Aug 6

Re: [Matplotlib-users] Adding Title to RadioButtons Axis

2011-08-07 Thread Jae-Joon Lee
On Fri, Aug 5, 2011 at 4:22 AM, Paul Blelloch wrote: > title   = 'Overlap' Did you mean to do title("Overlap") ? And yes it works as expected. If it does not work for you, please post a simple but complete example. -JJ

Re: [Matplotlib-users] Using comma as decimal separator

2011-08-07 Thread Jae-Joon Lee
I just installed the fr_FR locale and tested your patch, and I don't see any problem. I suspect that this is the problem of Axes3D (that has recently fixed by Ben), and has nothing with your patch. If I revert Ben's commit, than an error is raised regardless of the value of rcParams["axes.formatter

Re: [Matplotlib-users] Customize Tick Labels with Axis Artist

2011-07-20 Thread Jae-Joon Lee
There could be a few ways. What I recommend as a matter of fact is to use other method to draw gridlines. On the other hand, given that you have a working example, it could be better to have different axis to draw ticklabels in locations where you want. Here is a diff. Regards, -JJ *** qqwee2.py

Re: [Matplotlib-users] colorbar() moves to wrong place on subplots_adjust call

2011-06-16 Thread Jae-Joon Lee
On Tue, Jun 14, 2011 at 4:58 AM, Nicholas Devenish wrote: > Is there a way I can avoid or correct this behaviour? It certainly > seems erroneous that using the figure GUI to adjust plot bounds > doesn't work, and is an especially nice way of tweaking for final > plots. > Unfortunately no. This is

Re: [Matplotlib-users] quick documentation fix

2011-06-16 Thread Jae-Joon Lee
Thanks. I fixed it in in the master branch. https://github.com/matplotlib/matplotlib/commit/649df91f8e0bb77687be0711d64201904bcdde67 Regards, -JJ On Wed, Jun 15, 2011 at 7:04 AM, Uri Laserson wrote: > In the Legend Guide: > http://matplotlib.sourceforge.net/users/legend_guide.html > it gives

Re: [Matplotlib-users] Independent Legends

2011-06-03 Thread Jae-Joon Lee
The first argument of the "label" command is a list of artist to be labeled. And it does not matter whether they are associated with axes or not. What you can do, therefore, is 1) draw something as you want them in the legend 2) remove them from the axes 3) make a legend from these artists.

Re: [Matplotlib-users] eps and useTex: tick labels drawn over legend box

2011-05-31 Thread Jae-Joon Lee
Just in case, I have opened a git issue on this. https://github.com/matplotlib/matplotlib/issues/131 -JJ On Wed, Jun 1, 2011 at 1:23 PM, Jae-Joon Lee wrote: > I'm not 100% sure on this but it seems that this is a limitation of > "psfrag" that the ps backend relies on.

Re: [Matplotlib-users] eps and useTex: tick labels drawn over legend box

2011-05-31 Thread Jae-Joon Lee
I'm not 100% sure on this but it seems that this is a limitation of "psfrag" that the ps backend relies on. The ps backend first produces an eps file without TeX labels, and these TeX labels are put on the eps file with latex+psfrag. And it seems these TeX labels are always above the contents of t

Re: [Matplotlib-users] bug in mpl_toolkits.axes_grid1.AxesGrid?

2011-05-31 Thread Jae-Joon Lee
Using AxesGrid does not mean that color scales are shared. It only takes care of axes placement. And it is your responsibility to sync colorbars of multiple images. One option is to use *norm* attribute of images. norm = matplotlib.colors.Normalize() for i in range(3): im = grid[i].

Re: [Matplotlib-users] Feature request: automatic scaling of subplots, margins, etc

2011-05-17 Thread Jae-Joon Lee
Attached is a modified version of Tony's script. * no drawing is necessary * support subplots that span multiple rows/columns Please test it and let me know of any problem. I'm planning to push these functionality into matplolib after some refactoring (e.g., it would be good to have pyplot.tig

Re: [Matplotlib-users] Possible bug / odd behaviour in GridSpec?

2011-05-11 Thread Jae-Joon Lee
On Thu, May 12, 2011 at 7:18 AM, David Andrews wrote: > I'm quite interested in getting involved with mpl development, partly > as a way to get my head around python & numpy and aid porting a bunch > of stuff I use over to python from IDL.  Unless I'm doing something > totally wrong by expecting t

Re: [Matplotlib-users] Possible bug / odd behaviour in GridSpec?

2011-05-11 Thread Jae-Joon Lee
Yes, this is a bug that has been fixed. https://github.com/matplotlib/matplotlib/commit/76851eb Regards, -JJ On Thu, May 12, 2011 at 7:53 AM, Goyo wrote: > 2011/5/12 David Andrews : >> Hi, >> >> I've come across something I don't entirely understand in the >> behaviour of gridspec.  It's not

Re: [Matplotlib-users] Feature request: automatic scaling of subplots, margins, etc

2011-05-11 Thread Jae-Joon Lee
On Thu, May 12, 2011 at 2:59 AM, Benjamin Root wrote: > Most things, we do know the sizes of.  It is my understanding that it is the > text objects that is the unknown.  If this could be solved, then a layout > engine would be much more feasible. I doubt it. As far as I know, the main reason that

  1   2   3   4   5   6   7   8   9   >