[Matplotlib-users] Ticks

2009-04-27 Thread D2Hitman

I am looking to change the size/style of the tick markers. Not the labels
associated with each tick, the dashes. How do i go about this?

Cheers,

Jon.
-- 
View this message in context: 
http://www.nabble.com/Ticks-tp23253405p23253405.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Ticks

2009-04-27 Thread Sandro Tosi
On Mon, Apr 27, 2009 at 12:15, D2Hitman  wrote:
> I am looking to change the size/style of the tick markers. Not the labels
> associated with each tick, the dashes. How do i go about this?

There are several options in matplotlib config file (on Debian it's
/etc/matplotlibrc, but you can have also a user specific one) you can
use to configure the ticks style, for example:

#xtick.major.size : 4  # major tick size in points
#xtick.minor.size : 2  # minor tick size in points
#xtick.major.pad  : 4  # distance to major tick label in points
#xtick.minor.pad  : 4  # distance to the minor tick label in points
#xtick.color  : k  # color of the tick labels
#xtick.labelsize  : medium # fontsize of the tick labels
#xtick.direction  : in # direction: in or out

You can access them also with rcParam dictionary provided by matplotlib module.

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Ticks

2009-04-27 Thread Matthias Michler
Hi Jon,

the dashed associated with each tick are actually line instances and therefore 
hold information about the used marker, markersize, color, ... 

For example you could do the following:

import matplotlib.pyplot as plt
ax = plt.gca() # get the current axes

for l in ax.get_xticklines() + ax.get_yticklines():
l.set_markersize(10)

plt.show()

best regards Matthias

On Monday 27 April 2009 12:15:24 D2Hitman wrote:
> I am looking to change the size/style of the tick markers. Not the labels
> associated with each tick, the dashes. How do i go about this?
>
> Cheers,
>
> Jon.



--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Ticks

2009-04-27 Thread D2Hitman

Thanks both of you. Works nicely.

I was also looking for line thickness, so:

for l in ax.get_xticklines() + ax.get_yticklines():
l.set_markersize(10)
l.set_markeredgewidth(10)

Has a slightly blurry edge at that size, but does the job.

Cheers,

Jon.


Matthias Michler wrote:
> 
> Hi Jon,
> 
> the dashed associated with each tick are actually line instances and
> therefore 
> hold information about the used marker, markersize, color, ... 
> 
> For example you could do the following:
> 
> import matplotlib.pyplot as plt
> ax = plt.gca() # get the current axes
> 
> for l in ax.get_xticklines() + ax.get_yticklines():
> l.set_markersize(10)
> 
> plt.show()
> 
> best regards Matthias
> 
> On Monday 27 April 2009 12:15:24 D2Hitman wrote:
>> I am looking to change the size/style of the tick markers. Not the labels
>> associated with each tick, the dashes. How do i go about this?
>>
>> Cheers,
>>
>> Jon.
> 
> 
> 
> --
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensign option that enables unlimited
> royalty-free distribution of the report engine for externally facing 
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Ticks-tp23253405p23254032.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] warining with ipython

2009-04-27 Thread Bala subramanian
Friends,
I started pylab with ipython -pylab

After some time, i did

In [21]: import matplotlib
Warning: Timeout for mainloop thread exceeded
switching to nonthreaded mode (until mainloop wakes up again)

Why this warning comes ?

Even when i exit with ctrl + d, the shell is still remaining.

Thanks,
Bala
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] warining with ipython

2009-04-27 Thread Sandro Tosi
Hi Bala,

On Mon, Apr 27, 2009 at 13:40, Bala subramanian
 wrote:
> Friends,
> I started pylab with ipython -pylab

I think it would help if you can also specify what version of ipython
and matplotlib you're using, as long as what backend is configured to
be used.

> After some time, i did
>
> In [21]: import matplotlib
> Warning: Timeout for mainloop thread exceeded
> switching to nonthreaded mode (until mainloop wakes up again)
>
> Why this warning comes ?

I think this is something related to the graphical backend used, or
maybe a mixture from the default one and the one set by hand in this
session.

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] warining with ipython

2009-04-27 Thread Bala subramanian
Hi,

Version informations
Python 2.5.2
IPython 0.8.4
matplotlib 0.98.1
backend GTKAgg
Running on Fedora10

Bala

On Mon, Apr 27, 2009 at 2:36 PM, Sandro Tosi  wrote:

> Hi Bala,
>
> On Mon, Apr 27, 2009 at 13:40, Bala subramanian
>  wrote:
> > Friends,
> > I started pylab with ipython -pylab
>
> I think it would help if you can also specify what version of ipython
> and matplotlib you're using, as long as what backend is configured to
> be used.
>
> > After some time, i did
> >
> > In [21]: import matplotlib
> > Warning: Timeout for mainloop thread exceeded
> > switching to nonthreaded mode (until mainloop wakes up again)
> >
> > Why this warning comes ?
>
> I think this is something related to the graphical backend used, or
> maybe a mixture from the default one and the one set by hand in this
> session.
>
> Regards,
> --
> Sandro Tosi (aka morph, morpheus, matrixhasu)
> My website: http://matrixhasu.altervista.org/
> Me at Debian: http://wiki.debian.org/SandroTosi
>
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] line properties

2009-04-27 Thread Bala subramanian
Friends,
I am going through John Hunter's The Matplotlib User’s Guide. In the user
guide, one of the three ways of changing the line properties is given as
follows

Using set to control line properties
>>> l i n e s = p l o t ( t , s1 )
>>> s e t ( l i n e s , ma r k e r s i z e =15 , marker=’d’ , \
. . . ma r k e r f a c e c o l o r =’g’ , ma r k e r e d g e c o l o r =’r’
)

But when i try the same i get the following error, Kindly someone help me to
understand what i am doing wrong.

In [31]: new=plot(t,s)

In [32]: set(new, markersize=15)
---
TypeError Traceback (most recent call last)

/home/cbala/ in ()

TypeError: set() does not take keyword arguments


Thanks,
Bala
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] line properties

2009-04-27 Thread Sandro Tosi
Hi Bala,

On Mon, Apr 27, 2009 at 15:25, Bala subramanian
 wrote:
> Friends,
> I am going through John Hunter's The Matplotlib User’s Guide. In the user
> guide, one of the three ways of changing the line properties is given as
> follows
>
> Using set to control line properties
 l i n e s = p l o t ( t , s1 )
 s e t ( l i n e s , ma r k e r s i z e =15 , marker=’d’ , \
> . . . ma r k e r f a c e c o l o r =’g’ , ma r k e r e d g e c o l o r =’r’
> )
>
> But when i try the same i get the following error, Kindly someone help me to
> understand what i am doing wrong.

I think there's some sort of typo there, since it's setp

> In [31]: new=plot(t,s)
>
> In [32]: set(new, markersize=15)
> ---
> TypeError Traceback (most recent call last)
>
> /home/cbala/ in ()
>
> TypeError: set() does not take keyword arguments

In [6]: new = plt.plot(x,y)

In [7]: plt.setp(new, linewidth=10)
Out[7]: [None]

works as expected.

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] GSoC: TeX rendering engine

2009-04-27 Thread Michael Droettboom
Freddie Witherden wrote:
> However, my primary focus will be on Cairo and Qt backends. These are 
> widely used, allow for high quality output in various formats (PDF, 
> PNG and SVG being the big three) and are well tested.
It would also be great to pull in the pure-Python PDF and SVG code from 
matplotlib so that no C GUI libraries would be required.
>
> The lack of a C++/C library should not be a major issue. Python is 
> very well established in the fields that the library is likely to be 
> of most use (web, graphing, visualisation) and where it isn't there 
> will most certainly be a command-line tool
Cheers,
Mike

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] custom symbols for scatter

2009-04-27 Thread Ryan May
On Mon, Apr 27, 2009 at 7:50 AM, Juan Fiol  wrote:

> Hi, I am trying to put a sphere (rather than circles or disks) as markers
> for a
> plot. I am a newbiew so I tried the poor man approach: I plotted several
> circles
> one over the other for each point to mimic a sphere (looking it from very
> far).
> It kind of worked, except that all are not exactly the same and they
> distort
> when I change the aspect ratio of the plot. I am attaching two figures
> to show what I mean.
> I looked around in the mailing list and searched all over the web but did
> not
> find nothing mentioned. Any help is appreciated.
>

Can you post a self-contained version of your code so that we can see
exactly how you make the spheres?  You can just use random/hardcoded numbers
for the data in the plot.

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] line properties

2009-04-27 Thread Jouni K . Seppänen
Sandro Tosi  writes:

> I think there's some sort of typo there, since it's setp

Yes, it used to be set but then Python added the set data type with the
same name, so references to the old name could remain in some
documentation. This seems to be fixed in the current version of the
tutorial, though:

http://matplotlib.sourceforge.net/users/pyplot_tutorial.html#id2

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] custom symbols for scatter

2009-04-27 Thread Juan Fiol

Hi, thanks Ryan for the interest. Here is a short script to produce the data. 
The method also breaks if I change too much the radius of the sphere or the 
size at which they are plotted.

I am using:
Python 2.5.4
Matplotlib 0.98.5.2

Regards,
Code follows:
###
#!/usr/bin/env python
from matplotlib import pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
NN=9

xmin=0.1
xmax=3.5
x= np.arange(xmin,xmax,.10)
y=np.square(np.sin(x))

# Creamos la figura  
fig = plt.figure()
ax = fig.add_subplot(111)
ax.set_yscale('log')

# Sphere radius (also radius and centers for all inner circles)
radio=.1
rads= radio*(1. - np.arange(0,NN)/(1.*NN))
dl= np.array([(radio-r) for r in rads])*radio

ylimits=(0.01,1.2)


for x1,y1 in zip(x,y):
  ax.scatter(x1*(1+dl),y1+(y1*dl), cmap=plt.cm.Blues, c=rads,s=2500*rads, 
edgecolors='none')

ax.set_xlim(xmin,xmax)
ax.set_ylim(ylimits)

plt.show()
###


--- On Mon, 4/27/09, Ryan May  wrote:

> From: Ryan May 
> Subject: Re: [Matplotlib-users] custom symbols for scatter
> To: fi...@yahoo.com
> Cc: matplotlib-users@lists.sourceforge.net
> Date: Monday, April 27, 2009, 5:04 PM
> On Mon, Apr 27, 2009 at 7:50 AM, Juan Fiol
>  wrote:
> 
> > Hi, I am trying to put a sphere (rather than circles
> or disks) as markers
> > for a
> > plot. I am a newbiew so I tried the poor man approach:
> I plotted several
> > circles
> > one over the other for each point to mimic a sphere
> (looking it from very
> > far).
> > It kind of worked, except that all are not exactly the
> same and they
> > distort
> > when I change the aspect ratio of the plot. I am
> attaching two figures
> > to show what I mean.
> > I looked around in the mailing list and searched all
> over the web but did
> > not
> > find nothing mentioned. Any help is appreciated.
> >
> 
> Can you post a self-contained version of your code so that
> we can see
> exactly how you make the spheres?  You can just use
> random/hardcoded numbers
> for the data in the plot.
> 
> Ryan
> 
> -- 
> Ryan May
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma


  

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] line properties

2009-04-27 Thread Sandro Tosi
On Mon, Apr 27, 2009 at 18:11, Jouni K. Seppänen  wrote:
> Sandro Tosi  writes:
>> I think there's some sort of typo there, since it's setp
>
> Yes, it used to be set but then Python added the set data type with the
> same name, so references to the old name could remain in some
> documentation. This seems to be fixed in the current version of the
> tutorial, though:
>
> http://matplotlib.sourceforge.net/users/pyplot_tutorial.html#id2

ahhh I see.

hence I think that maybe Bala is using an old pdf guide you can easily
find on web, something written for 0.90.* or so.

Bala, if it's so, you should really consider got to
http://matplotlib.sourceforge.net/ and read the doc there (there
should be also a pdf, I suppose).

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] custom symbols for scatter

2009-04-27 Thread Jouni K . Seppänen
Juan Fiol  writes:

> Hi, I am trying to put a sphere (rather than circles or disks) as
> markers for a plot.

One approach could be to make a PatchCollection of suitable patches -
see 

http://matplotlib.sourceforge.net/examples/api/patch_collection.html

for an example of PatchCollection, and

http://matplotlib.sourceforge.net/examples/pylab_examples/dolphin.html

for a fairly complicated user-defined Patch. Matplotlib doesn't do any
gradient fills yet, so you're a little limited in drawing the sphere.

Another option is to make a bitmap drawing of a sphere in e.g. Gimp and
put multiple copies of it at various coordinates, but I don't think this
is well-supported currently.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Segmentation fault using imshow on large image

2009-04-27 Thread keflavich



Bugzilla from tkjacob...@gmail.com wrote:
> 
> Hi
> 
> It could be that you just have to much data for the stack. You can see/set 
> your stack size with ulimit -s (on linux/solaris at least). Try to set it
> to 
> unlimited:
> ulimit -s unlimited
> 
> This has solved similar problems for me in the past.
> 
> Best Regards
> Troels Kofoed Jacobsen
> 

Tried it, no luck.  Thanks for the tip, though.
-- 
View this message in context: 
http://www.nabble.com/Segmentation-fault-using-imshow-on-large-image-tp23207792p23260454.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] custom symbols for scatter

2009-04-27 Thread Juan Fiol

Thanks Jouni, my first try was to make a PNG in gimp and use imread/imshow but 
it did not work with Log scale.

I think that the best approach would be to create an object (may be a patch) 
with the sphere and put it in the plots but I do not know how to do it and will 
not have the time to investigate it for a couple of weeks.

Thanks, for your reply



  

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] GSoC: TeX rendering engine

2009-04-27 Thread projetmbc
C++ and Python versions would be great.

Christophe

Michael Droettboom a écrit :
> Freddie Witherden wrote:
>   
>> However, my primary focus will be on Cairo and Qt backends. These are 
>> widely used, allow for high quality output in various formats (PDF, 
>> PNG and SVG being the big three) and are well tested.
>> 
> It would also be great to pull in the pure-Python PDF and SVG code from 
> matplotlib so that no C GUI libraries would be required.



--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Interactive backends very (suprisingly?) slow for multiple subplots

2009-04-27 Thread keflavich

Hi, I'm trying to plot a series of ~30-50 small plots, each of which contains
3 plots of ~10-20 points (one plot is data, one plot is errorbars, one plot
is a model fit).  I've tried using GtkAgg and Qt4Agg as backends, and both
are extremely slow - they take ~5-10 seconds for the first plot window and
then hang.   Sometimes they'll plot subsequent windows, but sometimes they
will not.

I tried the same series of plot commands using the SVG, PS, and PDF backends
and the whole series of 50 plots takes <~1s.

So, is there any way to speed up my plotting?  I've tried turning
interactive plotting off (ioff()), but that didn't help any.

Thanks,
Adam
-- 
View this message in context: 
http://www.nabble.com/Interactive-backends-very-%28suprisingly-%29-slow-for-multiple-subplots-tp23261074p23261074.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] GSoC: TeX rendering engine

2009-04-27 Thread projetmbc
If it becomes easy to have formulas with Python then it would be used. 
That's sure. You can't say that C++ is better. I prefer Python, you work 
with C++, so why only a C++ version rather than a Python one ?

Christophe.



Kasper Peeters a écrit :
> Since the user base for a TeX typesetting library isn't particularly
> large (compared to other libraries), it's probably good to at least
> keep in mind that people might want to call this from a non-Python
> language (even though I will probably be tempted to convert my code to
> Python). In any case, having a Cairo backend will help.
>   


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Interactive backends very (suprisingly?) slow for multiple subplots

2009-04-27 Thread Jouni K . Seppänen
keflavich  writes:

> I tried the same series of plot commands using the SVG, PS, and PDF backends
> and the whole series of 50 plots takes <~1s.

Did you produce any output with savefig? 50 plots per second sounds
pretty fast - at least on my computer, the matplotlib examples render
much slower than that, so I suspect your test script might not have
really caused the backends to render anything. Anyway, if you want to
compare the execution time of the interactive backends, I suppose the
best reference would be the Agg backend, which does the same rendering
without any of the interactiveness.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] GSoC: TeX rendering engine

2009-04-27 Thread Kasper Peeters
> If it becomes easy to have formulas with Python then it would be used. 
> That's sure. You can't say that C++ is better. 

I didn't mean to say that, sorry if I gave the wrong impression. I
simply meant to say that _if_ there are certain design decisions which
can be made such that interfacing with other languages becomes easier,
it is worth doing that. 

I'd be perfectly happy with a Python-only version already.

Cheers,
Kasper

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Interactive backends very (suprisingly?) slow for multiple subplots

2009-04-27 Thread keflavich



Jouni K. Seppänen wrote:
> 
> keflavich  writes:
> 
>> I tried the same series of plot commands using the SVG, PS, and PDF
>> backends
>> and the whole series of 50 plots takes <~1s.
> 
> Did you produce any output with savefig? 50 plots per second sounds
> pretty fast - at least on my computer, the matplotlib examples render
> much slower than that, so I suspect your test script might not have
> really caused the backends to render anything. Anyway, if you want to
> compare the execution time of the interactive backends, I suppose the
> best reference would be the Agg backend, which does the same rendering
> without any of the interactiveness.
> 

Yes, I'm using savefig.  I switched to the 'Paint' backend so I can save as
.png and use Mac's preview to view the files as they're updated; that's my
cheap workaround for the moment.

I tried 'agg' and it performs essentially the same as 'Paint' - pretty fast. 
Maybe closer to 2-3s than 1s.

Adam
-- 
View this message in context: 
http://www.nabble.com/Interactive-backends-very-%28suprisingly-%29-slow-for-multiple-subplots-tp23261074p23261638.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] GSoC: TeX rendering engine

2009-04-27 Thread projetmbc
You're right. I've misunderstood your message.

Christophe

Kasper Peeters a écrit :
>> If it becomes easy to have formulas with Python then it would be used. 
>> That's sure. You can't say that C++ is better. 
>> 
>
> I didn't mean to say that, sorry if I gave the wrong impression. I
> simply meant to say that _if_ there are certain design decisions which
> can be made such that interfacing with other languages becomes easier,
> it is worth doing that. 
>
> I'd be perfectly happy with a Python-only version already.
>
> Cheers,
> Kasper
>  
>
>
>   



--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Interactive backends very (suprisingly?) slow for multiple subplots

2009-04-27 Thread John Hunter
On Mon, Apr 27, 2009 at 12:24 PM, keflavich  wrote:

>
> Hi, I'm trying to plot a series of ~30-50 small plots, each of which
> contains
> 3 plots of ~10-20 points (one plot is data, one plot is errorbars, one plot
> is a model fit).  I've tried using GtkAgg and Qt4Agg as backends, and both
> are extremely slow - they take ~5-10 seconds for the first plot window and
> then hang.   Sometimes they'll plot subsequent windows, but sometimes they
> will not.



That does sound exceedingly slow -- it looks like you are having some
problems with the GUI or environment and not just the mpl component.  How
are you running and profiling your script?  Can you post some free-standing
example code which exposes the problem?  Can you provide some of the
environment data detailed at
http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#reporting-problems
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] GSoC: TeX rendering engine

2009-04-27 Thread Freddie Witherden

Hi all,

On 27 Apr 2009, at 15:33, Michael Droettboom wrote:

Freddie Witherden wrote:
However, my primary focus will be on Cairo and Qt backends. These  
are widely used, allow for high quality output in various formats  
(PDF, PNG and SVG being the big three) and are well tested.
It would also be great to pull in the pure-Python PDF and SVG code  
from matplotlib so that no C GUI libraries would be required.


I agree, long term it would be good to have these available.

The lack of a C++/C library should not be a major issue. Python is  
very well established in the fields that the library is likely to  
be of most use (web, graphing, visualisation) and where it isn't  
there will most certainly be a command-line too.


On that note it is probably possible to write C++ library around the  
eventual Python API. Of course it will take a bit of work (and require  
a Python interpreter to linger) and it is not something I can claim  
much experience in -- but I can not see any reason why it would not be  
feasible.


Regards, Freddie.



PGP.sig
Description: This is a digitally signed message part
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Interactive backends very (suprisingly?) slow for multiple subplots

2009-04-27 Thread keflavich



John Hunter-4 wrote:
> 
> That does sound exceedingly slow -- it looks like you are having some
> problems with the GUI or environment and not just the mpl component.  How
> are you running and profiling your script?  Can you post some
> free-standing
> example code which exposes the problem?  Can you provide some of the
> environment data detailed at
> http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#reporting-problems
> 

I haven't been doing any profiling; I've never been particularly comfortable
with timeit.

As for normal problem reporting details...
Darwin eta.colorado.edu 9.6.3 Darwin Kernel Version 9.6.3: Tue Jan 20
18:26:40 PST 2009; root:xnu-1228.10.33~1/RELEASE_I386 i386 i386
matplotlib version 0.98.3


My example standalone script (note that it takes the backend as a command
line argument and assumes you have not selected a backend / imported pylab):

import matplotlib
import sys
matplotlib.use(sys.argv[1])
from pylab import *

i=1; n=1; 
print "Working on figure 0"
figure(0); clf()
for j in xrange(36):
if (i % 10)==0:
print "Working on figure %i" % n
figure(n); clf()
i=1
n+=1
subplot(3,3,i)  
plot([1,2,3],[3,2,1])
plot([1,2,1],[1,2,3])
plot([1,2,3],[1,2,3])
i+=1


Results: 

In [1]: %run -t code/test.py 'Qt4Agg'

backend Qt4Agg version 0.9.1

IPython CPU timings (estimated):
  User  :  21.553853 s.
  System:0.0 s.

In [1]: %run -t code/test.py 'pdf'

backend pdf version unknown

IPython CPU timings (estimated):
  User  :   1.056959 s.
  System:0.0 s.

In [1]: %run -t code/test.py 'svg'
backend svg version 0.98.5.2

IPython CPU timings (estimated):
  User  :   1.056702 s.
  System:0.0 s.


Curiously, if I add ioff() at the beginning of the script using the Qt4Agg
backend, I get the much nicer result:
  User  :   1.328496 s.

and show works quite rapidly.  This suggests to me that the placement of
ioff() is important, so I'm going to try playing with that a little...

Adam
-- 
View this message in context: 
http://www.nabble.com/Interactive-backends-very-%28suprisingly-%29-slow-for-multiple-subplots-tp23261074p23263295.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Interactive backends very (suprisingly?) slow for multiple subplots

2009-04-27 Thread keflavich

So, as the Matplotlib help page suggests, working through a test problem
helped me narrow down my problem... but it still hasn't solved it.  If I set
ioff() at the main level, rather than in a function I call, it works. 
However, when I show() the plot, the code halts until I close it, which is
not helpful.  I feel like this is a problem I've resolved before, but
googling hasn't helped me so far - I think the closest I have come are
"show() hangs" threads that have no replies.  

I guess this changes my question to:
How can I draw all of my figures non-interactively, then show them and
return to the python command prompt?  

ion()
show()

should work, I think, but does not.

Thanks,
Adam
-- 
View this message in context: 
http://www.nabble.com/Interactive-backends-very-%28suprisingly-%29-slow-for-multiple-subplots-tp23261074p23263639.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Interactive backends very (suprisingly?) slow for multiple subplots

2009-04-27 Thread John Hunter
On Mon, Apr 27, 2009 at 2:28 PM, keflavich  wrote:

>
>
> John Hunter-4 wrote:
> >
> > That does sound exceedingly slow -- it looks like you are having some
> > problems with the GUI or environment and not just the mpl component.  How
> > are you running and profiling your script?  Can you post some
> > free-standing
> > example code which exposes the problem?  Can you provide some of the
> > environment data detailed at
> >
> http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#reporting-problems
> >
>
> I haven't been doing any profiling; I've never been particularly
> comfortable
> with timeit.
>
> As for normal problem reporting details...
> Darwin eta.colorado.edu 9.6.3 Darwin Kernel Version 9.6.3: Tue Jan 20
> 18:26:40 PST 2009; root:xnu-1228.10.33~1/RELEASE_I386 i386 i386
> matplotlib version 0.98.3
>
>
> My example standalone script (note that it takes the backend as a command
> line argument and assumes you have not selected a backend / imported
> pylab):
>
> import matplotlib
> import sys
> matplotlib.use(sys.argv[1])
> from pylab import *
>
> i=1; n=1;
> print "Working on figure 0"
> figure(0); clf()
> for j in xrange(36):
>if (i % 10)==0:
>print "Working on figure %i" % n
>figure(n); clf()
>i=1
>n+=1
>subplot(3,3,i)
>plot([1,2,3],[3,2,1])
>plot([1,2,1],[1,2,3])
>plot([1,2,3],[1,2,3])
>i+=1
>
>
> Results:
>
> In [1]: %run -t code/test.py 'Qt4Agg'



Ahh, mixing matplotlib.use from an interactive ipython session -- that is an
important detail :-)  What is your backend (import matplotlib; print
matplotlib.rcParams['backend'])   It is quite likely that you are getting
cross GUI / cross threading problems from trying to do this inside ipython,
which may be using one GUI backend based on rc at pylab startup, and mpl is
trying to use another one with the use directive.  Basically, "use" is not
supported for switching GUIs, it was designed to be the first line executed
in a session but when you do this interactively in ipython pylab mode, you
are asking for a world of pain.

Try running your example from a standard unix shell rather than from ipython

JDH
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] line properties

2009-04-27 Thread John Hunter
On Mon, Apr 27, 2009 at 11:24 AM, Sandro Tosi  wrote:

> On Mon, Apr 27, 2009 at 18:11, Jouni K. Seppänen  wrote:
> > Sandro Tosi  writes:
> >> I think there's some sort of typo there, since it's setp
> >
> > Yes, it used to be set but then Python added the set data type with the
> > same name, so references to the old name could remain in some
> > documentation. This seems to be fixed in the current version of the
> > tutorial, though:
> >
> > http://matplotlib.sourceforge.net/users/pyplot_tutorial.html#id2
>
> ahhh I see.
>
> hence I think that maybe Bala is using an old pdf guide you can easily
> find on web, something written for 0.90.* or so.
>
> Bala, if it's so, you should really consider got to
> http://matplotlib.sourceforge.net/ and read the doc there (there
> should be also a pdf, I suppose).
>

There is.  Go to the "documententation" link and click on "Download PDF":

http://matplotlib.sf.net/Matplotlib.pdf


JDH
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Interactive backends very (suprisingly?) slow for multiple subplots

2009-04-27 Thread keflavich



John Hunter-4 wrote:
> 
> Ahh, mixing matplotlib.use from an interactive ipython session -- that is
> an
> important detail :-)  What is your backend (import matplotlib; print
> matplotlib.rcParams['backend'])   It is quite likely that you are getting
> cross GUI / cross threading problems from trying to do this inside
> ipython,
> which may be using one GUI backend based on rc at pylab startup, and mpl
> is
> trying to use another one with the use directive.  Basically, "use" is not
> supported for switching GUIs, it was designed to be the first line
> executed
> in a session but when you do this interactively in ipython pylab mode, you
> are asking for a world of pain.
> 
> Try running your example from a standard unix shell rather than from
> ipython
> 
> JDH
> 

Sorry, I should have specified: I wrote this script to use separate from my
interactive sessions as a test.  I use Qt4Agg now, set in my matplotlibrc,
and I do not use matplotlib.use() at all (since it doesn't work anyway). 
The faster performance I reported was achieved by setting the backend in my
matplotlibrc, not on the command line.  So I don't think I'm running into
the issues you're talking about.

I don't really know how to run a script in which I expect plots to show up
from the command line.  If I do something simple like 'python test.py' it
pops up windows but never shows the plots I expect to see.

Adam
-- 
View this message in context: 
http://www.nabble.com/Interactive-backends-very-%28suprisingly-%29-slow-for-multiple-subplots-tp23261074p23264479.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] warining with ipython

2009-04-27 Thread Sandro Tosi
On Mon, Apr 27, 2009 at 15:18, Bala subramanian
 wrote:
> Hi,
>
> Version informations
> Python 2.5.2
> IPython 0.8.4
> matplotlib 0.98.1

this is a rather old version, you might want to try to upgrade to
0.98.5.2 or a near release.

> backend GTKAgg
> Running on Fedora10

could you please provide a simple script (along with configuration
files that applies to your executions) to replicate the issue? I can
speculate there some GUI mixture, but with code in front it's easier
:)

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] xlabel vertical positioning

2009-04-27 Thread Thomas Robitaille
Hi,

This is probably a simple question, but what is the best way to  
control the vertical positioning of the x-axis label? I tried:

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as mpl

fig = mpl.figure()
ax = fig.add_subplot(111)
ax.set_xlabel("Hello",position=(0.5,-0.2))
fig.savefig('test.png')

But this doesn't work. Strangely, changing the first position element  
does shift the label left and right, but changing the second does not  
move the label vertically.

I'm using matplotlib 0.98.5.2

Thanks for any advice!

Thomas


--
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] xlabel vertical positioning

2009-04-27 Thread Jouni K . Seppänen
Thomas Robitaille  writes:

> This is probably a simple question, but what is the best way to  
> control the vertical positioning of the x-axis label? 

Matplotlib tries to set the vertical position automatically based on how
tall the tick labels are - see how e.g. the commands

setp(getp(gca(), 'xticklabels'), fontsize=2)
setp(getp(gca(), 'xticklabels'), fontsize=10)
setp(getp(gca(), 'xticklabels'), fontsize=20)

affect the position. If you're not happy with that, I think your best
bet is to use figtext instead of xlabel, and perhaps file a bug in the
matplotlib tracker, explaining how the current positioning is
insufficient for your needs.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users