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, 20

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 worka

Re: [Matplotlib-users] possible bug with scatter

2009-06-21 Thread Jae-Joon Lee
0), > > ? No, somehow the meaning 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, > >

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. set_transfo

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 gri

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, Art wrote: > Hi Eric, > > I was thinking more like the tiny attachment (hope attachments are ok). > Basically, given a list

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 a

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 S wrote: > > Hi, > I have the same problem. If you found the

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

2009-06-27 Thread Jae-Joon Lee
s that some sort of blending edge feature? I just installed > 0.98.5.3, but the sample code gives me the error: > > TypeError: __init__() got an unexpected keyword argument 'bbox_to_anchor' > > On Thu, Jun 25, 2009 at 10:20 PM, Jae-Joon Lee wrote: >> The linked pag

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 ins

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

2009-06-30 Thread Jae-Joon Lee
n 30, 2009 at 8:12 AM, Fabrice Silva wrote: > Le lundi 29 juin 2009 à 16:11 -0400, Jae-Joon Lee a écrit : >> I think the issue here is to connect points in two different axes, >> which is possible but can be a bit difficult. > That was my problem > >> In the svn version

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 qui

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 i

Re: [Matplotlib-users] to much points

2009-07-01 Thread Jae-Joon Lee
lot(x, y) plt.show() In this case, plot() runs fine, but segfault during show(). 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: > >

Re: [Matplotlib-users] to much points

2009-07-01 Thread Jae-Joon Lee
x27;m not an c++ expert, I'll leave it to you, Michael. Regards, -JJ On Wed, Jul 1, 2009 at 3:16 PM, Jae-Joon Lee wrote: > On Wed, Jul 1, 2009 at 2:34 PM, Michael Droettboom wrote: >> I agree with Jae-Joon here -- try to reduce the number of points before >> passing it to

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. host.set

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] 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, ax.trans

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

2009-07-03 Thread Jae-Joon Lee
.png >> http://files.getdropbox.com/u/533499/silicon_donor_10_newplot.png >> >> 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

Re: [Matplotlib-users] Append _one point_ to a plot?

2009-07-03 Thread Jae-Joon Lee
On Fri, Jul 3, 2009 at 1:05 PM, guillaume ranquet wrote: > but something sounds plain wrong, It sounds like there's too much > useless calculations and data copied. > Well, if you think something is wrong, I guess you may have chosen a wrong tool. MPL is mainly for 2d plotting, and not very strong

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 few

Re: [Matplotlib-users] zoomed in detail box

2009-07-08 Thread Jae-Joon Lee
If you use the svn version of matplotlib, you may use axes_grid toolkit. http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#insetlocator I think the required inset_locator module actually does not depend on other modules in axes_grid, so if you're not using svn, you may

Re: [Matplotlib-users] zoomed in detail box

2009-07-08 Thread Jae-Joon Lee
Arrrg, it depends on other module in axes_grid toolkit. So, you need svn version of mpl. However, It is possible to specify the location of the axes in normalized axes coordinate. http://thread.gmane.org/gmane.comp.python.matplotlib.general/16373 -JJ On Wed, Jul 8, 2009 at 10:57 PM, Jae-Joon

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 SEVER 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(r"DMT CCN Concentration [ #/$cm^3$]") > > but as it is seen from the f

Re: [Matplotlib-users] zoomed in detail box

2009-07-09 Thread Jae-Joon Lee
On Thu, Jul 9, 2009 at 7:24 AM, Robin wrote: >> On Wed, Jul 8, 2009 at 10:57 PM, Jae-Joon Lee wrote: >>> If you use the svn version of matplotlib, you  may use axes_grid toolkit. >>> >>> http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.ht

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 Hunter wrote: > On Mon,

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 share

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 How

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 Laserson 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 one of the >

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 (http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.htm

Re: [Matplotlib-users] non interactive runs keep crashing due to DISPLAY

2009-07-17 Thread Jae-Joon Lee
Are you trying to run your script without opening a gui window? If yes, "interacitve" is not what you want. http://matplotlib.sourceforge.net/faq/howto_faq.html#matplotlib-in-a-web-application-server Anyhow, I had similar experience that some Tk application failed to open over ssh connection. An

Re: [Matplotlib-users] Axes position is changed during rendering

2009-07-17 Thread Jae-Joon Lee
"imshow" sets aspect=1 unless you changed your rcparams. Unless aspect="auto", the axes position changes during the drawing time. call imshow with aspect="auto" or use set_aspect method. http://matplotlib.sourceforge.net/api/axes_api.html?highlight=aspect#matplotlib.axes.Axes.set_aspect Regards

Re: [Matplotlib-users] grouping several line types together in legend of plots

2009-07-17 Thread Jae-Joon Lee
On Thu, Jul 16, 2009 at 10:49 PM, per freem wrote: > hi all, > > suppose i have am plotting several lines using 'plot', some are dashed > (using '--') and some are ordinary solid lines. i am plotting several solid > and several dashed lines, all in different colors, as in: > > for n in num_lines: >

Re: [Matplotlib-users] formatting help with legend for stacked bar graph with many categories

2009-07-17 Thread Jae-Joon Lee
To change the legend font size, you may change the "legend.fontsize" in rcParams. The change will be global. If you want to change the font size of some particular legend, use the appropriate font property as the "prop" keyword. http://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=legen

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 Loudermilk 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 for this. > I have many g

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 blen

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 you

Re: [Matplotlib-users] changing appearance of legend line entries

2009-07-19 Thread Jae-Joon Lee
http://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=legend#matplotlib.pyplot.legend numpoints=1 is what you want. For font size and etc, check the similar question posted a few days ago. http://www.nabble.com/formatting-help-with-legend-for-stacked-bar-graph-with-many-categories-td24

Re: [Matplotlib-users] rotating labels, what is wrong?!

2009-07-20 Thread Jae-Joon Lee
get_xmajorticklabels() returns a list of matplotlib's "Text" objects, not python strings. http://matplotlib.sourceforge.net/api/axes_api.html?highlight=get_xmajorticklabels#matplotlib.axes.Axes.get_xmajorticklabels On the other hand, set_xticklabels() takes a list of python strings. http://matpl

Re: [Matplotlib-users] rotating labels, what is wrong?!

2009-07-20 Thread Jae-Joon Lee
On Mon, Jul 20, 2009 at 4:48 PM, John [H2O] wrote: > > > > Jae-Joon Lee wrote: >> >> get_xmajorticklabels() returns a list of matplotlib's "Text" objects, >> not python strings. >> > > This is what I've now come to understand, but it se

Re: [Matplotlib-users] Having trouble with aligning subplots

2009-07-20 Thread Jae-Joon Lee
index for subplot starts from 1, not 0 (the convention is from Matlab). Regards, -JJ On Mon, Jul 20, 2009 at 6:31 PM, W. Augustine Dunn III wrote: > Hello y'all: > > I am trying to plot a fig with three subplots.  However when I run my > script the subplots are all shifted way too high > (http:

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

2009-07-21 Thread Jae-Joon Lee
> In [30]: fig = figure() > > In [31]: ax = fig.add_subplot(111) > > In [32]: ax.plot_date(time, data, '-') > Out[32]: [] > > In [33]: show() > > In [34]: fig.autofmt_xdate() > > > In [37]: > C:\Python25\lib\site-packages\matplotlib\backends\backe

Re: [Matplotlib-users] adjusting the height of rectangle legend handles

2009-07-21 Thread Jae-Joon Lee
The height of the box will scale with the font size. If you want to change the height independent of the font size, you need to manually adjust the properties of the individual legend handles. l = legend() patches = l.get_patches() # list of legend handles whose type is matplotlib.Patch. for p in

Re: [Matplotlib-users] How to get ticks "out" using mpl_toolkits.axes_grid.axislines ?

2009-07-23 Thread Jae-Joon Lee
Hi, Thanks for reporting this. The axes class in axes_grid toolkits uses different artists to render ticks and ticklabels. And some of the features in the original matplotlib won't work correctly, and the "tick direction" turned out to be one of them. However, I just committed a fix for this to t

Re: [Matplotlib-users] imshow with side plots whitespace problem

2009-07-25 Thread Jae-Joon Lee
The axes_grid toolkit is base on use cases for images of aspect 1, and I haven't carefully considered cases where the aspect is different from 1. And I guess this is one of such cases I overlooked. Please try to add below lines in your code (I couldn't try your code because of the missing data fil

Re: [Matplotlib-users] Design questions

2009-07-27 Thread Jae-Joon Lee
On Mon, Jul 27, 2009 at 11:55 AM, Tony S Yu wrote: > The 3rd issue is a bit more difficult. One approach is to use > Jae-Joon's AxesGrid toolkit; you > may need to be using the latest development version of matplotlib to use the toolkit. I think it would be easier to use the recently added spine s

Re: [Matplotlib-users] square plots with linear equal axes -- help

2009-07-27 Thread Jae-Joon Lee
Well, I think the meaning of the axis("equal") is a bit misleading (at least to me), but if you look at the documentation, it says that it changes the xlimit and ylimit (limits in data coordinate), so this is NOT what you want. What you need is axis("scaled") or axis("image"). http://matplotlib.so

Re: [Matplotlib-users] Design questions

2009-07-27 Thread Jae-Joon Lee
On Mon, Jul 27, 2009 at 4:06 PM, Gewton Jhames wrote: > How to "trim the canvas" of the image generated? It's transparent, but still > have a "padding", if it would be cropped, I can safe almost 200px!. I have > attached a file to this email to show it, the background of the graph was > set to red

Re: [Matplotlib-users] animation/"live"-plotting + performance

2009-07-29 Thread Jae-Joon Lee
On Tue, Jul 28, 2009 at 9:11 AM, Roland Koebler wrote: > Hi, > > I've got some performance problems with matplotlib, and would like to > ask if you know any way I can make it faster. > > If there is no such way, I have to decide to (a) either enhance matplotlib > or (b) write my own plotting-librar

Re: [Matplotlib-users] Crosshairs

2009-07-29 Thread Jae-Joon Lee
scatter() currently does not support arbitrary path as its marker. The current marker customization is limited to what can be described by RegularPolyCollection and etc. And the crosshair marker do not fit in to this category. I'm attaching a snippet of a code I have been using for an exactly same

Re: [Matplotlib-users] question about legend

2009-07-29 Thread Jae-Joon Lee
The documentation for scatter command is out of date unfortunately. You need to use "scatterpoints" keyword. http://www.nabble.com/legend-bug--td22466216.html#a22466216 -JJ On Mon, Jul 27, 2009 at 3:44 PM, per freem wrote: > Hi all > > i am making a scatter plot and want to label one of the poin

Re: [Matplotlib-users] Include icon in plot

2009-07-30 Thread Jae-Joon Lee
The location of the image can be set by specifying the "extent" keyword, however, this is set in data coordinate. figimage may be close to what you want. http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.figimage As far as I know, there is no direct support in matplotlib to

Re: [Matplotlib-users] setting user defined color map as default

2009-07-30 Thread Jae-Joon Lee
I don't think there is any user-visible support for registering a custom colormap. However, it seems to me that adding the colormap to matplotlib.cm.datad distionary is enough. Note that the value need to be a dictionary of RGB specification, not the actual colormap instance. for example, mycolor

Re: [Matplotlib-users] AxesGrid question

2009-08-01 Thread Jae-Joon Lee
The axes_grid toolkit is recently added to the matplotlib, and you need to have development version of matplotlib. You may try the matplotlib 0.99rc1 released a few days ago http://www.nabble.com/matplotlib-0.99.0-rc1-%3A-call-for-testing-td24760373.html or you may try to install from the svn ht

Re: [Matplotlib-users] clabel and bbox

2009-08-01 Thread Jae-Joon Lee
The clable command returns a list of Text instances. You need call set_bbox method for each of them. tl = clabel(...) for t in tl: t.set_bbox(dict(fc="y")) For clabels, which are often rotated, it may better to use fancy box style (the default bbox is not rotated even though the text is).

Re: [Matplotlib-users] AxesGrid question

2009-08-01 Thread Jae-Joon Lee
for the stable release, and the other for development version? This seems to be one of the obvious solutions to me. Regards, -JJ > > Tommy > > On Aug 1, 2009, at 9:27 AM, Jae-Joon Lee wrote: > >> The axes_grid toolkit is recently added to the matplotlib, and you >> need

Re: [Matplotlib-users] Include icon in plot

2009-08-02 Thread Jae-Joon Lee
> > Any idea what might cause this issue? Did I do something wrong? I know > it's not pretty, but it should work right? > > Cheers! > Bas > > > > 2009/7/30 Bas van Leeuwen : >> Hi JJ, >> >> Thank you for your kind and speedy reply, I completely glanced ov

Re: [Matplotlib-users] Change the text of yticklabels

2009-08-02 Thread Jae-Joon Lee
Use pylab's yticks command. http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.yticks Or Axes.set_yticklabels together with Axes.set_yticks. http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.set_yticklabels -JJ On Fri, Jul 31, 2009 at 4:07 PM, Lukas

Re: [Matplotlib-users] clabel and bbox

2009-08-02 Thread Jae-Joon Lee
On Sat, Aug 1, 2009 at 5:04 PM, Andres Luhamaa wrote: > Thank You, > > but now I have another little annoying issue. Besides clabel I add some > text manually to my plot with plt.text and sometimes the clabel and > plt.text overlap, and no matter in which order I plot them, the string > from clabel

Re: [Matplotlib-users] spines versus subplotzero

2009-08-02 Thread Jae-Joon Lee
Yes, using spines will be best in most situation. The problem with using axes_grid toolkit is that some mpl commands that changes the properties of the ticks and ticklabels do not work. I think you may consider to use axes_grid if you want to keep both of the bottom and top axis, which I guess wo

Re: [Matplotlib-users] Include icon in plot

2009-08-03 Thread Jae-Joon Lee
> in a figure but in a QT frame containing several subplots. But thank > youfor the suggestion, I will try if the imshow approach appears > fruitless. > > > 2009/8/2 Jae-Joon Lee : >> A snippet of code does not help in general. >> Please take your time to create a simple, s

Re: [Matplotlib-users] Hiding data via legend

2009-08-04 Thread Jae-Joon Lee
On Tue, Aug 4, 2009 at 12:50 PM, John Hunter wrote: > On Mon, Aug 3, 2009 at 11:38 PM, Gökhan Sever wrote: >> Hello, >> >> I was wondering if it is possible to hide some data on figures using a say >> right click option to any of the legend entry and make it temporarily >> hidden/visible to better

Re: [Matplotlib-users] 0.99.0-RC1 and the animation_blit_gtk2 example

2009-08-04 Thread Jae-Joon Lee
On Tue, Aug 4, 2009 at 12:14 PM, Christophe Dupre wrote: > Hello, > > > > I've been playing with the animation_blit_gtk2 example > (http://matplotlib.sourceforge.net/examples/animation/animation_blit_gtk2.html > > ) and the latest version of matplotlib version 0.99.0-RC1. > > I've modified the exam

Re: [Matplotlib-users] Subaxes

2009-08-06 Thread Jae-Joon Lee
The thread below might be helpful. http://thread.gmane.org/gmane.comp.python.matplotlib.general/16373 This will work as far as you keep the aspect="auto". Also, if you're using matplotlib 0.99rc version, or matplotlib from svn, you may take a look at http://matplotlib.sourceforge.net/mpl_toolki

Re: [Matplotlib-users] 0.99.0-RC1 and the animation_blit_gtk2 example

2009-08-06 Thread Jae-Joon Lee
n my machine, I get a > frame rate of 30 FPS if I redraw both X and Y axis. The rate goes much higher > ( greater than 100 FPS) if I don't redraw the axis. > > Thanks, > > Christophe > > > -Original Message- > From: Jae-Joon Lee [mailto:lee.j.j...@gm

Re: [Matplotlib-users] No legend using scatter function

2009-08-06 Thread Jae-Joon Lee
This turned out to be a bug introduced recently, which is now fixed in the 0.99 maintenance branch. The fix is not merged into the head yet. I tried svnmerge.py but it gave some merge conflict. While the conflict seems rather trivial, I'll leave it to others. Meanwhile, you can explicitly give art

Re: [Matplotlib-users] No legend using scatter function

2009-08-06 Thread Jae-Joon Lee
out. -JJ -ps. By the way, I'm afraid that this fix missed the 0.99 release. > Thanks. > > On Thu, Aug 6, 2009 at 11:47 AM, Jae-Joon Lee wrote: >> >> This turned out to be a bug introduced recently, which is now fixed in >> the 0.99 maintenance branch. >>

Re: [Matplotlib-users] No legend using scatter function

2009-08-06 Thread Jae-Joon Lee
On Thu, Aug 6, 2009 at 1:13 PM, John Hunter wrote: > On Thu, Aug 6, 2009 at 11:47 AM, Jae-Joon Lee wrote: >> This turned out to be a bug introduced recently, which is now fixed in >> the 0.99 maintenance branch. >> The fix is not merged into the head yet. I tried svnmerge.p

Re: [Matplotlib-users] Using bbox_to_anchor to get the legend off of my graph

2009-08-08 Thread Jae-Joon Lee
The guide is based on mpl 0.99. You may upgrade your mpl, or take a look at the thread below. it is a workaround that will work with older version. -JJ On Fri, Aug 7, 2009 at 8:29 PM, Eliezer, David wrote: > Hi, >     I am graphing several time series together on the same graph, > and so it

Re: [Matplotlib-users] axes_grid examples

2009-08-10 Thread Jae-Joon Lee
John, I changed the axes_grid examples to use get_sample_data and committed them to the svn yesterday. However, these examples won't work unless the user uses mpl from the svn (I don't think get_sample_data is in 0.99 maint). But, at some point during the last dev cycle, I think the gallery in our

Re: [Matplotlib-users] Confused about get_tightbbox() and renderer

2009-08-12 Thread Jae-Joon Lee
get_tightbbox is a bit experimental feature and it is discouraged for an ordinary user (maybe the method should not be an public method). Unless you understand how the internal transformation thing works, I'm afraid there is not much thing you can do with its return value. Instead, you should use

Re: [Matplotlib-users] twinx/twiny usage

2009-08-12 Thread Jae-Joon Lee
On Wed, Aug 12, 2009 at 3:16 PM, Uri Laserson wrote: > Hi, > > I am trying to overlay a few Axes object that need to share axes.  I would > like it to be the case that if I change the properties of one axis (e.g., > scale), the corresponding axis of the other axes will have the properties > changed

Re: [Matplotlib-users] placing xlabel in the correct place when using tick_top

2009-08-12 Thread Jae-Joon Lee
http://matplotlib.sourceforge.net/search.html?q=set_label_position&check_keywords=yes&area=default ax2.xaxis.set_label_position("top") ax2.yaxis.set_label_position("right") Regards, -JJ On Thu, Aug 13, 2009 at 12:10 AM, Duncan Mortimer wrote: > Hi all, > > I'm trying to produce a graph in whic

Re: [Matplotlib-users] executing function when view interval changes

2009-08-17 Thread Jae-Joon Lee
I took a stab at this during the weekends and a patch is attached. 1) introduces a new command subplot2grid. e.g., subplot2grid(shape=(3,3), loc=(0,0), colspan=3) it still creates a Subplot instance. 2) subplot command can take a SubplotSpec instance which is created using the GridSpec. gs = G

[Matplotlib-users] pywcsgrid2 : matplotlib with astronomical fits images

2009-08-17 Thread Jae-Joon Lee
Hello, pywcsgrid2 is my personal project to display astronomical fits images using matplotlib. While there are other tools, my approach is to extend the capability of the matplolib, rather than building something new on top of it. pywcsgrid2 provides a custom Axes class (derived from the matplotl

Re: [Matplotlib-users] animate histogram

2009-08-18 Thread Jae-Joon Lee
On Tue, Aug 18, 2009 at 1:53 PM, Alan G Isaac wrote: > 2. This is pretty fast.  Would there be additional > speed gains to blitting, and if so, how would it > be done?  (I'm just asking for clues, not a complete > example.) Blitting will improve the performance when significant portion of your plo

Re: [Matplotlib-users] One more time: frame linewidth

2009-08-18 Thread Jae-Joon Lee
I guess you're using 0.99? Use spines instead. for example, gca().spines["bottom"].set_linewidth(2) # it only changes the linewidth of the bottom spine. also, see this example, http://matplotlib.sourceforge.net/examples/pylab_examples/spine_placement_demo.html#pylab-examples-spine-placement-dem

Re: [Matplotlib-users] figure legend with mplot3d

2009-08-18 Thread Jae-Joon Lee
On Tue, Aug 18, 2009 at 1:33 PM, dek wrote: > > the patch3dcollection object not good for legend figure, I am having trouble > thinking of a work > around. Is there manually a way to insert artist and labels into the legend > and make it such that it is independent from the axes? Using a proxy arti

Re: [Matplotlib-users] xticklabels possition on a bar chart

2009-08-18 Thread Jae-Joon Lee
You need to adjust the positions of the ticks. bar command (by default) creates boxes so that their left side corresponds the first argument. http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.bar so, in your case, something like below will work (0.4 from 0.8/2 where 0.8 is t

Re: [Matplotlib-users] how to get the properties for elements in a collection?

2009-08-18 Thread Jae-Joon Lee
sct1 = axes.scatter(x,y, c=some_list, cmap=plt.get_cmap(colmap)) colors = sct1.get_facecolors() The return value is an array of rgb values. -JJ On Mon, Aug 17, 2009 at 3:40 PM, Carlos Grohmann wrote: > Hi, I have a collection, which is a scatter plot, and I want to > iterate through all the ele

Re: [Matplotlib-users] how to get the properties for elements in a collection?

2009-08-18 Thread Jae-Joon Lee
See below for available public methods. http://matplotlib.sourceforge.net/api/collections_api.html#matplotlib.collections.Collection -JJ On Tue, Aug 18, 2009 at 6:16 PM, Jae-Joon Lee wrote: > sct1 = axes.scatter(x,y, c=some_list, cmap=plt.get_cmap(colmap)) > colors = sct1.get_face

Re: [Matplotlib-users] Line2D on multiple plots?

2009-08-18 Thread Jae-Joon Lee
On Mon, Aug 17, 2009 at 10:29 AM, Ole Streicher wrote: > Hi, > > I want to show the same data on multiple plots. Is it possible to re-use > the Line2D object for that? t.m., > > line = axes1.plot(xdata, ydata, ...) > > ... > > axes2.lines.append(line) > > Or is a Line2D bound to a certain axes inst

Re: [Matplotlib-users] Custom ticklabels on colorbar

2009-08-21 Thread Jae-Joon Lee
On Fri, Aug 21, 2009 at 10:01 AM, Scott Sinclair wrote: >> I just realized that I did not give the correct plot object when creating >> the colorbar. Now it works perfectly to pass arguments by set_xticklabels(). >> >> However, another question just arose. To format the numbers on the tick >> label

Re: [Matplotlib-users] Create axes instance position relative to another axes instance position??

2009-08-22 Thread Jae-Joon Lee
What you need is to adjust the axes position of the colorbar at the drawing time (because the axes position of the contour plot is adjusted only during the drawing time). You may do this by properly setting the axe_locator property of the axes. If you're using mpl 0.99, axes_grid toolkit may be he

Re: [Matplotlib-users] help needed in plotting curved elements

2009-08-22 Thread Jae-Joon Lee
On Thu, Aug 20, 2009 at 2:01 AM, Sameer Regmi wrote: > We tried the method 1 but the result was a garbled mesh Please describe what you did and why the result is wrong. The method 1 with quadratic bezier curve should be most straight-forward and easy thing to do. Calculating the control points is

Re: [Matplotlib-users] Create axes instance position relative to another axes instance position??

2009-08-24 Thread Jae-Joon Lee
Marsh > Graduate Research Assistant > School of Meteorology > University of Oklahoma > http://www.patricktmarsh.com > > > > > On Sat, Aug 22, 2009 at 10:37 PM, Jae-Joon Lee wrote: >> What you need is to adjust the axes position of the colorbar at the >> draw

Re: [Matplotlib-users] Cursor position

2009-08-24 Thread Jae-Joon Lee
On Mon, Aug 24, 2009 at 1:14 PM, Thomas Robitaille wrote: > > Hi, > > I'm interested in controlling how the cursor position appears at the bottom > of interactive windows. > > I noticed that by default, it is the Formatter that gets called. However, in > my case, the displayed coordinates each depe

Re: [Matplotlib-users] display pixels values on the backends

2009-08-24 Thread Jae-Joon Lee
On Mon, Aug 24, 2009 at 1:48 PM, Xavier Gnata wrote: > Hi, > > I have already asked about that but I'm back once again :) > > The way I use matplotlib may be a corner case: > I'm often looking at large (4k x 4k) images and I do want to see the > pixels values moving the mouse over the display. > im

Re: [Matplotlib-users] Custom ticklabels on colorbar

2009-08-25 Thread Jae-Joon Lee
Please, take your time and post a "standalone" code that reproduces your problem so that others can actually test. Also, please describe what results you have and why they are wrong. On Tue, Aug 25, 2009 at 4:08 AM, Daniel Platz wrote: > fig1.colorbar(pc1,ax=ax1,orientation='horizontal',pad=0.025,

Re: [Matplotlib-users] mplot3D plot_surface colors

2009-08-26 Thread Jae-Joon Lee
On Wed, Aug 26, 2009 at 6:22 AM, German Ocampo wrote: > Hello > > Are there some way to take out the gridlines from a surface in mplot3D > and get a smooth colour change? > I think surface plot does not draw any gridlines by default (linewidth set to 0). Maybe you're referring the artifacts betwe

Re: [Matplotlib-users] yaxis labels on both sides

2009-08-27 Thread Jae-Joon Lee
I don't think there is a direct support for this in mpl and I guess only way is to adjust the parameters of each ticks. def set_ticks_both(axis): ticks = list( axis.majorTicks ) # a copy ticks.extend( axis.minorTicks ) for t in ticks: t.tick1On = True # tick marker on left (or

Re: [Matplotlib-users] preserving transparency in eps

2009-08-31 Thread Jae-Joon Lee
If you need to stick to eps, another option is to use rasterization feature of the matplotlib itself. This way you can keep part of plot in vector format (e.g., texts, lines, etc ) while rasterizing others. Of course this solution only works if the "quality" of those being rasterized is not very im

Re: [Matplotlib-users] Placing vector eps graphics

2009-09-01 Thread Jae-Joon Lee
You may use PyX for compositing two eps images. It is not a gui application like inkscape. But it is one of the best option I know for eps compositing. http://pyx.sourceforge.net/manual/epsfile.html Regards, -JJ On Tue, Sep 1, 2009 at 11:09 AM, jakobg wrote: > > Hi there, > > I want to place a

Re: [Matplotlib-users] Delete Line & legend from graph using matplotlib & wxPython

2009-09-02 Thread Jae-Joon Lee
On Wed, Sep 2, 2009 at 11:41 AM, Sebastian Rhode wrote: > So I already figure out how to delete the last drawn line, but this is not a > very good solution. What I actually would need, is a selection which line & > legend the users whats to remove from the graph (perfect would be > interactivly dir

Re: [Matplotlib-users] funny bug with greek letters

2009-09-04 Thread Jae-Joon Lee
In [162]: print "$\beta$" eta$ In [163]: print r"$\beta$" $\beta$ use the raw sting for math expression. Regards, -JJ On Fri, Sep 4, 2009 at 12:06 PM, Nicolas Chopin wrote: >  Hi list, > when I do: > hist(randn(100)); xlabel('$\gamma$') > things work as expected. > However, if I try: > hist(ra

Re: [Matplotlib-users] cannot plot in loops with matplotlib 0.99. 0.98 works fine

2009-09-06 Thread Jae-Joon Lee
I presume you're running that script in interactive shell? Try draw() instead of show(). Regards, -JJ On Sun, Sep 6, 2009 at 3:06 PM, tva wrote: > > Hi all > > with matplotlib 0.98.5.3 this script will draw new lines as the scrips is > running: > > from pylab import * > x = arange(0,2*pi,0.01)

Re: [Matplotlib-users] slow rendering of 2K images using Animation_blit_tk.py - bis

2009-09-06 Thread Jae-Joon Lee
There are a few ways to improve the speed, which, I guess, will give you factor of a few speed up. If you need more than that, I guess matplotlib is not suitable for your purpose. * try a simple interpolation method, eg. imshow(arr, interpolation="nearest") * reduce the image size. Unless you hav

  1   2   3   4   5   6   7   8   9   >