[Matplotlib-users] tgif
hi, does matplotlib support tgif? with best regards, -- -dikshie- -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] tgif
dikshie wrote: > hi, > does matplotlib support tgif? > > > with best regards, > I had to google tgif to find out that it is the file format output by the tgif drawing program (http://bourbon.usc.edu:8001/tgif/current.html). It is not an image format, and matplotlib cannot read or write it. If you mean gif, the answer is still no, although you can easily convert from png to gif using PIL. -Jeff -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] tgif
On Wed, Jan 28, 2009 at 3:05 AM, dikshie wrote: > hi, > does matplotlib support tgif? No, you can see a list of outputs at http://matplotlib.sourceforge.net/faq/installing_faq.html#backends JDH -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting durations
On Tue, Jan 27, 2009 at 11:00 PM, C M wrote: > I don't think there is a built-in way to do this, but > I thought I'd check first. Can matplotlib (somehow) > directly plot a duration of time, such as in the form: > 0:01:39.983001 (h:m:s:microsec) In general, you must first convert your data to floating point (eg seconds) and then plot that. There is a way of registering custom types to automate the conversions and axis formatting, however , so it can be done. This is how we support plotting of python datetime objects. See for example http://matplotlib.sourceforge.net/examples/units/date_converter.html http://matplotlib.sourceforge.net/examples/units/date_support.html and the matplotlib.units module JDH -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Ploting f(x;y)=0
Title: Flashmail Hello, I'm looking a solution for ploting relation like f(x;y)=0. Best regards. Christophe. -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] unable to create legend for vlines graph
Hi,
I am unable to create legend for vlines graph. I have modified the
vline_demo.py to demonstrate the problem (see below)
#!/usr/bin/env python
from matplotlib.pyplot import *
from numpy import sin, exp, absolute, pi, arange
from numpy.random import normal
def f(t):
s1 = sin(2*pi*t)
e1 = exp(-t)
return absolute((s1*e1))+.05
t = arange(0.0, 5.0, 0.1)
s = f(t)
nse = normal(0.0, 0.3, t.shape) * s
#plot(t, s+nse, 'b^')
vlines(t, [0], s, label='vline demo')
##Legend creation addedin the demo
legend()
##Legend creation addedin the demo
xlabel('time (s)')
title('Comparison of model with data')
show()
I am getting following error stack
## File "\ActivePython25\Lib\site-packages\matplotlib\figure.py", line 772, in
draw
##for a in self.axes: a.draw(renderer)
## File "\ActivePython25\Lib\site-packages\matplotlib\axes.py", line 1601, in
draw
##a.draw(renderer)
## File "\ACTIVE~1\lib\site-packages\matplotlib\legend.py", line 316, in draw
##self._update_legend_box(renderer)
## File "\ACTIVE~1\lib\site-packages\matplotlib\legend.py", line 626, in
_update_legend_box
##legline_marker = legline._legmarker
##AttributeError: 'Line2D' object has no attribute '_legmarker'
Do I have to do something specific to get the legend for vlines graph ?
regards,
Nitin
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Problems with the command "show".
Hi folks, I have a problem when I use the command "show" in matplotlib. I have this code (campo is a matrix of float numbers): from matplotlib.pyplot import figure, show, savefig from matplotlib import cm, colors fig=figure() a=fig.add_subplot(111) a.pcolormesh(vx,vz,campo) show() The first time that I run the code, there isn´t any problem but when I run the code twice, I can´t close the figure and Python give me this error message: "RunTime Error! This application has requested the RunTime to terminate it in an unusual way. Please contact the application´s support team for more information." Somebody can help me? Thank you in advance at all. Oscar Public University of Navarra. _ Llévate Messenger en tu móvil allá donde vayas ¿A qué esperas? http://serviciosmoviles.es.msn.com/-- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Installing latest version of matplotlib for enthought python
I installed EPD and now would like to install the latest version of matplotlib so I can try out the new CocoaAgg background. I can download the binary mpkg from sourceforge, but it won't work for me because my python version isn't the python from python.org. Can someone help me get this installed? Mac OS 10.5.6 EPD with Py2.5 (4.0.30002 ) -- http://www.enthought.com/epd Thanks, Jeremy -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] matplotlib equivalent to MATLAB meshc?
I'd like to make a mesh plot that has colors in it and a countor plot below it just like in matlab's meshc function. Is there a builtin function that does this, or how could I go about doing it from scratch? Thanks, Ryan -- View this message in context: http://www.nabble.com/matplotlib-equivalent-to-MATLAB-meshc--tp21709817p21709817.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] unable to create legend for vlines graph
This is a bug introduced in the recent version of MPL.
While it is fixed in the maintenance branch, there is no release yet.
You may
1) try the svn version
or
2) apply the patch by yourself.
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/v0_98_5_maint/lib/matplotlib/legend.py?r1=6685&r2=6818&diff_format=u
or
3) use previous release of mpl (0.95 and before)
or
4) draw a line (using plot() command) with same line characteristic
outside the axes area and use this line for the legend.
Regards,
-JJ
On Wed, Jan 28, 2009 at 10:05 AM, Nitin Bhide wrote:
> Hi,
>
> I am unable to create legend for vlines graph. I have modified the
> vline_demo.py to demonstrate the problem (see below)
>
> #!/usr/bin/env python
> from matplotlib.pyplot import *
> from numpy import sin, exp, absolute, pi, arange
> from numpy.random import normal
>
> def f(t):
>s1 = sin(2*pi*t)
>e1 = exp(-t)
>return absolute((s1*e1))+.05
>
> t = arange(0.0, 5.0, 0.1)
> s = f(t)
> nse = normal(0.0, 0.3, t.shape) * s
>
> #plot(t, s+nse, 'b^')
> vlines(t, [0], s, label='vline demo')
> ##Legend creation addedin the demo
> legend()
> ##Legend creation addedin the demo
> xlabel('time (s)')
> title('Comparison of model with data')
> show()
>
> I am getting following error stack
>
> ## File "\ActivePython25\Lib\site-packages\matplotlib\figure.py", line 772,
> in draw
> ##for a in self.axes: a.draw(renderer)
> ## File "\ActivePython25\Lib\site-packages\matplotlib\axes.py", line 1601,
> in draw
> ##a.draw(renderer)
> ## File "\ACTIVE~1\lib\site-packages\matplotlib\legend.py", line 316, in draw
> ##self._update_legend_box(renderer)
> ## File "\ACTIVE~1\lib\site-packages\matplotlib\legend.py", line 626, in
> _update_legend_box
> ##legline_marker = legline._legmarker
> ##AttributeError: 'Line2D' object has no attribute '_legmarker'
>
> Do I have to do something specific to get the legend for vlines graph ?
>
> regards,
> Nitin
>
>
>
>
>
> --
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Drawing Splines
John Hunter wrote: > On Tue, Jan 27, 2009 at 12:44 PM, Mostafa Razavi wrote: > >> At http://www.scipy.org/Cookbook/Matplotlib/SigmoidalFunctions I read >> that matplotlib supports drawing arbitrary paths with splines, but the >> functionality hasn't been exposed to the user. Can anyone tell me how I >> can use this functionality? I tried searching the source code for >> "spline," but I couldn't find anything useful. >> >> (Sorry if this has been already brought up. I tried to search the >> archives but, weirdly enough, I couldn't find any search functionality. >> Perhaps it hasn't been exposed to the user, yet!) >> >> > > This is lightly documented, so no worries. See the following examples > > http://matplotlib.sourceforge.net/examples/api/path_patch_demo.html > http://matplotlib.sourceforge.net/examples/event_handling/path_editor.html > http://matplotlib.sourceforge.net/examples/pylab_examples/dolphin.html > > and the docs for the path module > > http://matplotlib.sourceforge.net/api/path_api.html > > JDH > If I've got it right, the path class represents a set of bezier curves. This is not exactly what I was looking for. Bezier splines and ordinary polynomial splines are essentially the same thing, of course, but I'd rather find a way to use the latter so that I won't have to do unnecessary conversions. Basically, my problem is that there are a set of points given and I should calculate and draw a cubic spline that interpolates them. My instructor has suggested using Matlab, but I don't have it, and I don't know how to use it. Besides, I always prefer Python, if possible. Any ideas? -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Drawing Splines
Mostafa Razavi wrote: > Basically, my problem is that there are a set of points given and I > should calculate and draw a cubic spline that interpolates them. My > instructor has suggested using Matlab, but I don't have it, and I don't > know how to use it. Besides, I always prefer Python, if possible. Any > ideas? Read this: http://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] unfilled markers?
On Jan 27, 2009, at 1:02 PM, Eric Firing wrote: > Setting > mfc to "none" is what turns off the filling. As a slightly off-topic question, is there a reason that the argument is the string 'none' instead of a normal python None? -Rob Rob Hetland, Associate Professor Dept. of Oceanography, Texas A&M University http://pong.tamu.edu/~rob phone: 979-458-0096, fax: 979-845-6331 -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Ploting f(x;y)=0
On Jan 28, 2009, at 8:26 AM, [email protected] wrote: > I'm looking a solution for ploting relation like f(x;y)=0. I usually just contour the function over the region. E.g., >>> import numpy as np >>> import matplotlib.pyplot as plt >>> x, y = mgrid[-10:10:50j, -10:10:50j] >>> f = x**3 * y - 3.0 >>> contour(x, y, f, (0,)) The fourth argument to contour is a list of contours to plot, here only zero. -Rob Rob Hetland, Associate Professor Dept. of Oceanography, Texas A&M University http://pong.tamu.edu/~rob phone: 979-458-0096, fax: 979-845-6331 -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] universal_newline in matplotlib 0.91.2?
John Hunter wrote: > On Mon, Jan 26, 2009 at 1:10 PM, Christopher Barker >> Shouldn't csv2rec open files in Universal mode by default anyway? > > The only down side I can see to this is universal support can be > disabled at build time, though it is on by default. At least this is > my interpretation of > > http://www.python.org/dev/peps/pep-0278/ well, that was 7 years ago (wow!), I don't know if anyone turns it off now, but in any case, so what? it'll act like it does now ( open() ignores flags it doesn't understand -- at least it did ) > It's a pretty rare bug (in my experience and I work on linux, unix and > os x and freqeuently with excel files) with an easy workaround (pass > in your own file handle) so I am not sure we need a fix here. But why the heck not? and according to the OP, Excel does create such files. Personally, I try to ALWAYS use 'U' when opening text files -- it can save headaches, and I see no downside. It really should be the default -- it's not, because the default was always text, but that was the same as binary on *nix -- so there is a lot of *nix code out there opening binary files without the 'b' flag. So we couldn't change the default back in 2002, it would have broken a LOT of code. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] universal_newline in matplotlib 0.91.2?
On Wed, Jan 28, 2009 at 2:11 PM, Christopher Barker wrote: > But why the heck not? and according to the OP, Excel does create such files. > > Personally, I try to ALWAYS use 'U' when opening text files -- it can > save headaches, and I see no downside. It really should be the default > -- it's not, because the default was always text, but that was the same > as binary on *nix -- so there is a lot of *nix code out there opening > binary files without the 'b' flag. So we couldn't change the default > back in 2002, it would have broken a LOT of code. Fair enough -- changed on the trunk in r6845 JDH -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] unfilled markers?
On Wed, Jan 28, 2009 at 9:42 AM, Rob Hetland wrote: > > On Jan 27, 2009, at 1:02 PM, Eric Firing wrote: > >> Setting >> mfc to "none" is what turns off the filling. > > As a slightly off-topic question, is there a reason that the argument > is the string 'none' instead of a normal python None? None means use the rc param, so it is overloaded here. Not particularly elegant, but None was already in use for all the line properties and we needed some way to specify unfilled. -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
