Re: [Matplotlib-users] how to make a bar plot with xaxis datatime vals?

2008-08-29 Thread Mathieu Leplatre
On Thu, Aug 28, 2008 at 12:15 AM, andy yu <[EMAIL PROTECTED]> wrote: > i 'm using the way > > X = load(data1.dat) > datalen = X[:, 1] > times = X[:, 0] > > times is UNIX_TIMESTAMP of datetime. > > > data1.dat file like this: > > > > 1158224731 1858 > 1158225026 1926 > 1158225328 1959 > 1158225627 2

Re: [Matplotlib-users] plot_date() - Correct format to plot

2008-08-29 Thread Mathieu Leplatre
On Wed, Aug 27, 2008 at 11:14 AM, stuartornum <[EMAIL PROTECTED]> wrote: > > Hi, > > I would like to be able to plot dates along the X axis' with values up the > Y. However Im having problems with the correct format in order to pass to > plot_date(). > > This is what I have so far: (example) > > ##

Re: [Matplotlib-users] axis formatting

2008-08-27 Thread Mathieu Leplatre
Uri, You could look have a look at : gca().xaxis.tick_bottom() gca().yaxis.tick_left() or hide the frame : ax = axes( FrameOne=False ) Hope this helps. On Tue, Aug 26, 2008 at 11:35 PM, Uri Laserson <[EMAIL PROTECTED]> wrote: > Hi, > > Is it possible to create plots that only have a single x

Re: [Matplotlib-users] set font and color problem

2008-08-27 Thread Mathieu Leplatre
For the colors, I just use : textobj.set_color( #FF ) textobj.set_alpha( 0.5 ) For the fonts, I never noticed there were a limit : textobj.set_fontname( "DejaVu Sans" ) I would be interested in a way to check if the selected font exists on the system or not, because currently no exception i

Re: [Matplotlib-users] tick line formatting

2008-08-27 Thread Mathieu Leplatre
Hi Uri, AFAI, in matplotlibrc you have : ### TICKS # see http://matplotlib.sourceforge.net/matplotlib.axis.html#Ticks #xtick.direction : in # direction: in or out #ytick.direction : in # direction: in or out Hope it helps. Mathieu. On Tue, Aug 26, 2008 at 11:35 PM, Uri Laserso

Re: [Matplotlib-users] SVG backend fails with locale change

2008-08-26 Thread Mathieu Leplatre
mpy). > > In any case, I've committed a workaround to matplotlib, which unfortunately > results in slightly larger SVG files. This is now fixed in SVN r6049. Look > there for a patch if you just want to fix your local backend_svg.py. > Thanks for your lightspeed fix submit !

[Matplotlib-users] SVG backend fails with locale change

2008-08-25 Thread Mathieu Leplatre
Hi, If I change the locale using cairo backend, the result is fine. But with SVG backend, every objects collapse on top-left corner. As you can see here : http://mathieu-leplatre.info/media/matplotlib-svg/localechange-svg.svg I exported it to png with inkscape to reveal objects outside of frame

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

2008-08-24 Thread Mathieu Leplatre
modified the original example. The solution is nice, I'll go for this one ! I don't feel confident enough yet to look inside the library's code, I definitely should ! Thank you very much Jae-Joon ! > > -JJ > > > > > > > > > On Thu, Aug 21, 2008 a

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

2008-08-21 Thread Mathieu Leplatre
Hi all, I am trying to automatically adjust margins with the SVG backend. The FAQ example : http://matplotlib.sourceforge.net/doc/html/faq/howto_faq.html#how-do-i-automatically-make-room-for-my-tick-labels only works with GUI backends. May it come from get_window_extent() call ? How could I modif

Re: [Matplotlib-users] Automatic margins

2008-08-19 Thread Mathieu Leplatre
On Fri, Aug 15, 2008 at 1:52 PM, Mathieu Leplatre <[EMAIL PROTECTED]> wrote: >> There is a FAQ showing how to do this for tick labels using the >> bounding boxes of the labels. You could do something similar with the >> title bounding box >> >> http://mat

Re: [Matplotlib-users] font style problem!

2008-08-19 Thread Mathieu Leplatre
> but font style dosen't effect while other properties set properly. > what is the problem?? Did you try using a font name ? - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linu

Re: [Matplotlib-users] Automatic margins

2008-08-15 Thread Mathieu Leplatre
> There is a FAQ showing how to do this for tick labels using the > bounding boxes of the labels. You could do something similar with the > title bounding box > > http://matplotlib.sourceforge.net/doc/html/faq/howto_faq.html#how-do-i-automatically-make-room-for-my-tick-labels > > JDH > Thank you

Re: [Matplotlib-users] Control space between bars

2008-08-15 Thread Mathieu Leplatre
Thank you so much Jae-Joon and Tony. You saved me so much time ! The whole transforms system was very obscure (to me !). >> trans = (ax.transScale + ax.transLimits).inverted() barspace = 0.32 #inches barstep = abscissa[1] - abscissa[0] trans = (ax.transScale + ax.transLimits).inverted() ba

Re: [Matplotlib-users] Control space between bars

2008-08-14 Thread Mathieu Leplatre
= 0.5 actualcoords = "%s" % trans.transform([valx, valy]) #Gives me [328, 240] instead of [2.0, 2.0] ax.text(valx, valy, actualcoords, transform=trans) P.show() - On Wed, Aug 13, 2008 at 10:34 AM, Mathieu Leplatre <[EMAIL PROTECTED]> wrote: > Hi all, > > I've sea

[Matplotlib-users] Automatic margins

2008-08-13 Thread Mathieu Leplatre
Is there a way to automatically guess margins according to chart content ? Like, in this small example : import pylab fig = pylab.figure() pylab.plot([1,2,3]) pylab.title('Big One', fontsize=72) topmargin = 0.2 # Auto ? fig.subplots_adjust(top=1.0-topmargin) pylab.show() --

[Matplotlib-users] Control space between bars

2008-08-13 Thread Mathieu Leplatre
Hi all, I've searched in examples and archives and could not find anything about manual control of space between bars. By default, the bars in the following script overlap. So I guess the behaviour is : specify chart width (8in) + bar width (0.8) => auto bar space And I would like to know how t

Re: [Matplotlib-users] Labels sometimes cut off (pie chart)

2008-08-05 Thread Mathieu Leplatre
On Tue, Aug 5, 2008 at 12:21 PM, Jonathan Hayward, http://JonathansCorner.com <[EMAIL PROTECTED]> wrote: > The pie chart sometimes cuts off even relatively short labels that extend > beyond the edge of the image (.1, .1, .8, .8). > > What is the best way to dodge labels getting cut off, or is there

Re: [Matplotlib-users] how add axes scale to my plot?

2008-08-02 Thread Mathieu Leplatre
On Sat, Aug 2, 2008 at 4:18 AM, sa6113 <[EMAIL PROTECTED]> wrote: > > No, unfortuantly matplotlib.axes dosen't have this attribute. > You can find demos in matplotlib examples of set_xlim() : in manual_axis.py : fig = figure(facecolor='white') ax = fig.add_subplot(111, frame_on=False) ax.plot(x,

Re: [Matplotlib-users] SVG rendering problems

2008-07-31 Thread Mathieu Leplatre
> Can you send your SVG files (or the scripts that generate them) to this list > so I can look at why they may be failing? Screenshots or PNGs from > ImageMagick and/or eog may also be useful, in case I can't reproduce the > problems with the versions I have here. Mike, do you want them as attach

[Matplotlib-users] SVG rendering problems

2008-07-29 Thread Mathieu Leplatre
Hi all, With both matplotlib versions (0.91 and 0.98), my SVGs are rendered correctly in Inkscape (and almost well in Firefox), but they are not rendered correctly when viewed with ImageMagick or Eye-of-Gnome. I did screenshots here, showing this "curve cropping" issue : http://mathieu-leplatre.i

Re: [Matplotlib-users] Arabic Character Support

2008-07-08 Thread Mathieu Leplatre
rface = cairo.ImageSurface (cairo.FORMAT_ARGB32, width, height) cr = cairo.Context (surface) svg.render_cairo (cr) surface.write_to_png (filepng) Thanks again for your assistance ! Long live sub-cultures and their exotic writings ! 2008/6/25 Mathieu Leplatre <[EMAIL PROTECTED]>: > Well, I'll give a

Re: [Matplotlib-users] Arabic Character Support

2008-06-25 Thread Mathieu Leplatre
table > (which would probably not be officially supported by mpl). > > Darren > > On Wednesday 25 June 2008 09:02:41 am Mathieu Leplatre wrote: >> Hi all, >> >> I have been trying to follow your tips regarding matplotlib and arabic >> support. >> >>

Re: [Matplotlib-users] Arabic Character Support

2008-06-25 Thread Mathieu Leplatre
Hi all, I have been trying to follow your tips regarding matplotlib and arabic support. Indeed matplotlib with Latex and unicode work great together : #-*- coding: utf-8 -*- from pylab import * from matplotlib import rcParams rcParams['text.usetex']=True rcParams['text.latex.unicode']=True figur