Re: [Matplotlib-users] How to plot a 2d streamline in 3d view in matplotlib

2015-05-21 Thread Benjamin Root
Sorry, it is "line_collection_2d_to_3d()". On Thu, May 21, 2015 at 12:02 PM, Raj Kumar Manna wrote: > Its giving a error, > > art3d.linecollection_2d_to_3d(stream.lines) > AttributeError: 'module' object has no attribute 'linecollection_2d_to_3d' > > > > Here is my script, > > > import matplotli

Re: [Matplotlib-users] How to plot a 2d streamline in 3d view in matplotlib

2015-05-21 Thread Raj Kumar Manna
Its giving a error, art3d.linecollection_2d_to_3d(stream.lines) AttributeError: 'module' object has no attribute 'linecollection_2d_to_3d' Here is my script, import matplotlib.pyplot as plt from matplotlib.patches import Circle, PathPatch from mpl_toolkits.mplot3d import Axes3D import mpl_too

Re: [Matplotlib-users] How to plot a 2d streamline in 3d view in matplotlib

2015-05-21 Thread Benjamin Root
(keeping the discussion on the mailing list) The object you get back have two attributes: "lines" and "arrows". This is just psuedo-code, but it would look something like this: ``` stream = ax.streamplot(..) art3d.linecollection_2d_to_3d(stream.lines, ) for p in stream.arrows: art3d.p

Re: [Matplotlib-users] How to plot a 2d streamline in 3d view in matplotlib

2015-05-21 Thread Benjamin Root
Well, there is the new 3D quiver feature: http://matplotlib.org/examples/mplot3d/quiver3d_demo.html. Not quite streamlines, but it might do in a pinch. Another approach: There is the 2d streamplot() function that returns a specialized object. >From the docstring: ``` Returns: *stream_

[Matplotlib-users] How to plot a 2d streamline in 3d view in matplotlib

2015-05-21 Thread Raj Kumar Manna
Hi, I need to plot a 2d streamline in 3d view like this . As suggested by the post , I need to extract streaml

Re: [Matplotlib-users] How to plot other than rectangular grid?

2014-11-22 Thread Ian Thomas
Masha, As suggested before, take a look at the triangular mesh functions. There are simple contour ( http://matplotlib.org/examples/pylab_examples/tricontour_demo.html) and pcolor plots ( http://matplotlib.org/examples/pylab_examples/tripcolor_demo.html), plus linear and cubic interpolation ( htt

Re: [Matplotlib-users] How to plot other than rectangular grid?

2014-11-21 Thread Maria Liukis
Thank you for the note, but it is definitely many more extra cells than just one around the border. Especially bounding area on the east side of the state is affected the most. Thanks, Masha On Nov 21, 2014, at 11:31 AM, Benjamin Root mailto:ben.r...@ou.edu>> wrote: How many cells past the

Re: [Matplotlib-users] How to plot other than rectangular grid?

2014-11-21 Thread Benjamin Root
How many cells past the state boundary are you seeing? If it is never more than one cell past the boundary, it might be an offset issue. On Fri, Nov 21, 2014 at 1:30 PM, Maria Liukis wrote: > Eric, > > Yes, my data is exactly how you understood it. I thought, as you are > suggesting, to create a

Re: [Matplotlib-users] How to plot other than rectangular grid?

2014-11-21 Thread Maria Liukis
Eric, Yes, my data is exactly how you understood it. I thought, as you are suggesting, to create a masked array for rectangle that bounds state of CA, to be used with pcolormesh(). The only existing functionality that I could find is griddata(), but it also interpolates data to extra cells outs

Re: [Matplotlib-users] How to plot other than rectangular grid?

2014-11-21 Thread Maria Liukis
Thank you for the suggestion, unfortunately “nearest” method for interpolation still does interpolation to some extra cells outside of my CA grid which fall within the convex hull. I thought I check if there is existing functionality for that within matplotlib, but it seems that I have to manual

Re: [Matplotlib-users] How to plot other than rectangular grid?

2014-11-21 Thread Eric Firing
On 2014/11/20, 7:11 PM, Maria Liukis wrote: > Hello, > > I have a problem plotting data which is defined on a grid other than > rectangular mesh, and would greatly appreciate any advise. My data is > defined for 0.1degree grid for the state of California, and I don’t > want to interpolate my data o

Re: [Matplotlib-users] How to plot other than rectangular grid?

2014-11-21 Thread Oliver
As Thomas Caswell said, check out the "tri..." functions. No need for interpolation. This question recently reappeared on Stackoverflow and was answered there as well: https://stackoverflow.com/questions/27004422/contour-imshow-plot-for-irregular-x-y-z-data 2014-11-21 9:15 GMT+01:00 Shahar Shani K

Re: [Matplotlib-users] How to plot other than rectangular grid?

2014-11-21 Thread Shahar Shani Kadmiel
When using scipy.interpolate.griddada, you could use 'nearest' if your data is sufficiently dense. This will 'map' your grid onto whatever rectangular grid leaving grid points outside the convex hull of the original grid empty. Well, not empty but nan. If you do wish to interpolate your dada, yo

Re: [Matplotlib-users] How to plot other than rectangular grid?

2014-11-20 Thread Thomas Caswell
There are also triangular mesh plotting (I think tricolormesh is the function name). The really brute force solution is to use poly collection and draw what ever shape you want. Tom -- Download BIRT iHub F-Type - The Free

[Matplotlib-users] How to plot other than rectangular grid?

2014-11-20 Thread Maria Liukis
Hello, I have a problem plotting data which is defined on a grid other than rectangular mesh, and would greatly appreciate any advise. My data is defined for 0.1degree grid for the state of California, and I don’t want to interpolate my data outside of the defined grid when plotting it. I used

Re: [Matplotlib-users] how to plot a sphere and two more curves, and the aspect ratio to be preserved

2014-04-08 Thread Benjamin Root
Which version of matplotlib are you using? There used to be some issues with this, but I could have sworn I resolved this a while back. Ben Root On Mon, Apr 7, 2014 at 2:40 PM, Emilia Petrisor wrote: > Dear all, > > > I want to visualize the image through the stereographic projection (that > m

[Matplotlib-users] how to plot a sphere and two more curves, and the aspect ratio to be preserved

2014-04-07 Thread Emilia Petrisor
Dear all, I want to visualize the image through the stereographic projection (that maps the extended complex plane to the unit sphere), of a circle and a line from the plane. I imported: import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure

Re: [Matplotlib-users] How to plot only a legend?

2012-07-27 Thread Andreas Hilboll
> On Thu, Jul 26, 2012 at 06:05:39PM +0200, Andreas Hilboll wrote: >> > Hi Andreas, >> > >> > 2012/7/26 Andreas Hilboll : >> >> Hi, >> >> >> >> I would like to create a figure which only contains a legend, and no >> >> axes >> >> at all. I would like to manually assign the colors. I found this >> h

Re: [Matplotlib-users] How to plot only a legend?

2012-07-26 Thread Francesco Montesano
Hi, you should be also able to create the axes as: ax = plt.figure( figsize=(x,y) ).add_subplot(111) with figsize big enough to fit just the legend Cheers Francesco 2012/7/26 Damon McDougall : > On Thu, Jul 26, 2012 at 06:05:39PM +0200, Andreas Hilboll wrote: >> > Hi Andreas, >> > >> > 2012/7/2

Re: [Matplotlib-users] How to plot only a legend?

2012-07-26 Thread Damon McDougall
On Thu, Jul 26, 2012 at 06:05:39PM +0200, Andreas Hilboll wrote: > > Hi Andreas, > > > > 2012/7/26 Andreas Hilboll : > >> Hi, > >> > >> I would like to create a figure which only contains a legend, and no > >> axes > >> at all. I would like to manually assign the colors. I found this here: > >> > >

Re: [Matplotlib-users] How to plot only a legend?

2012-07-26 Thread Daπid
On Thu, Jul 26, 2012 at 5:05 PM, Andreas Hilboll wrote: > That's really easy :) I could live with this solution, applying some > external tool like pdfcrop to the result. If you can use other output, you can generate a png image, which would be easier to cut (even inside MPL.image). This, without

Re: [Matplotlib-users] How to plot only a legend?

2012-07-26 Thread Andreas Hilboll
> Hi Andreas, > > 2012/7/26 Andreas Hilboll : >> Hi, >> >> I would like to create a figure which only contains a legend, and no >> axes >> at all. I would like to manually assign the colors. I found this here: >> >>http://stackoverflow.com/a/3302666 >> >> but from there on, I'd like to remove t

Re: [Matplotlib-users] How to plot only a legend?

2012-07-26 Thread Francesco Montesano
Hi Andreas, 2012/7/26 Andreas Hilboll : > Hi, > > I would like to create a figure which only contains a legend, and no axes > at all. I would like to manually assign the colors. I found this here: > >http://stackoverflow.com/a/3302666 > > but from there on, I'd like to remove the axes, and put

[Matplotlib-users] How to plot only a legend?

2012-07-26 Thread Andreas Hilboll
Hi, I would like to create a figure which only contains a legend, and no axes at all. I would like to manually assign the colors. I found this here: http://stackoverflow.com/a/3302666 but from there on, I'd like to remove the axes, and put the legend into three columns. Any help is greatly a

Re: [Matplotlib-users] [matplotlib-users] How to plot digamma function (psi)

2012-07-10 Thread Fabien Lafont
Thanks! The problem came from the 1/2 ! For convenience I've found the function digamma on numpy *http://docs.scipy.org/doc/scipy/reference/generated/scipy.special.psi.html But it's quite hard to find it! Maybe we can ask to add digamma in the title between parenthesis? Fabien * 2012/7/10 Damon

Re: [Matplotlib-users] [matplotlib-users] How to plot digamma function (psi)

2012-07-10 Thread Damon McDougall
On Tue, Jul 10, 2012 at 08:57:24AM -0400, Benjamin Root wrote: > On Tue, Jul 10, 2012 at 7:05 AM, Damon McDougall > wrote: > > > On Tue, Jul 10, 2012 at 12:27:59PM +0200, Fabien Lafont wrote: > > > > > But It returns zero division error even when x is in ]0,1] > > > > I think it blows up at x = 0.

Re: [Matplotlib-users] [matplotlib-users] How to plot digamma function (psi)

2012-07-10 Thread Benjamin Root
On Tue, Jul 10, 2012 at 7:05 AM, Damon McDougall wrote: > On Tue, Jul 10, 2012 at 12:27:59PM +0200, Fabien Lafont wrote: > > Hello everyone, > > > > I try to plot the digamma function of (1/2 + 1/x) but I'm not sure that > I'm > > plotting the good one. > > > > I've tried: > > > > special.polygamm

Re: [Matplotlib-users] [matplotlib-users] How to plot digamma function (psi)

2012-07-10 Thread Damon McDougall
On Tue, Jul 10, 2012 at 12:27:59PM +0200, Fabien Lafont wrote: > Hello everyone, > > I try to plot the digamma function of (1/2 + 1/x) but I'm not sure that I'm > plotting the good one. > > I've tried: > > special.polygamma(0, (1/2 + 1/x)) > > and > > special.polygamma(1, (1/2 + 1/x)) You wan

[Matplotlib-users] [matplotlib-users] How to plot digamma function (psi)

2012-07-10 Thread Fabien Lafont
Hello everyone, I try to plot the digamma function of (1/2 + 1/x) but I'm not sure that I'm plotting the good one. I've tried: special.polygamma(0, (1/2 + 1/x)) and special.polygamma(1, (1/2 + 1/x)) but I don't have the same result as with mathcad. I've tried to code it like that: def F(x):

[Matplotlib-users] How to plot oblique figure

2012-03-20 Thread 刘一新
The normal shape of a figure is a rectangle. But how can I create a oblique figure, i.e. with side length not perpendicular each other. Thanks! -- *Yi-Xin Liu, PHD* *Department of Macromolecular Science* *Fudan University* *Room 415, Yuejing Building * *Handan Rd. 220, **Shanghai, China* *Tel +86

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Ethan Gutmann
On Jan 27, 2012, at 9:11 AM, Fabien Lafont wrote: > Ive tried: > > for i in range(0,NbPts): >if column1[i] == nan: >column1[i].remove(nan) >column2[i].remove(nan) > > to remove these points but it doesn't work > you are close, I think what you want is: # assuming column1

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Fabien Lafont
Thanks a lot, I'll try to remove the points using isnan() 2012/1/27 Fabrice Silva : > What about masked arrays ? > http://docs.scipy.org/doc/numpy/reference/maskedarray.html > > > -- > Fabrice Silva > > > -- > Try before y

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Fabrice Silva
What about masked arrays ? http://docs.scipy.org/doc/numpy/reference/maskedarray.html -- Fabrice Silva -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft dev

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Benjamin Root
On Fri, Jan 27, 2012 at 10:11 AM, Fabien Lafont wrote: > Yes in fact it plot it well, but then I have a vector like: > [3702.13999, nan, nan, nan, 3703.79, nan, nan, nan, > 3704.69001, 3704.84001] > and it's impossible to fit it. It return 'nan'. > > Ive tried: > > for i in

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Jérôme
Fri, 27 Jan 2012 16:48:25 +0100 Fabien Lafont a écrit: > I want to plot something like: > > > X(time)Ypoints > 08 > 1 > 2 7 > 3 > 4 > 5 > 6 > 7 > 8 > 9 Sorry if I'm missing something, but can't you plot Y [8,7] against X [0,2] ? -- Jérôme -

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Fabien Lafont
Yes in fact it plot it well, but then I have a vector like: [3702.13999, nan, nan, nan, 3703.79, nan, nan, nan, 3704.69001, 3704.84001] and it's impossible to fit it. It return 'nan'. Ive tried: for i in range(0,NbPts): if column1[i] == nan: column1[i].remove(n

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Benjamin Root
On Fri, Jan 27, 2012 at 9:52 AM, Fabien Lafont wrote: > Sorry, It's an awkward manipulation. I finish the mail > > 2012/1/27 Fabien Lafont : > > I want to plot something like: > > > > > > X(time)Ypoints > > 08 > > 1 > > 27 > > 36

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Fabien Lafont
Sorry, It's an awkward manipulation. I finish the mail 2012/1/27 Fabien Lafont : > I want to plot something like: > > > X(time)        Ypoints > 0                    8 > 1 > 2                   7 > 36 > 44 > 5 > 6 > 77 > 8

[Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Fabien Lafont
I want to plot something like: X(time)Ypoints 08 1 2 7 3 4 5 6 7 8 9 -- Try before you buy = See our experts in action! The most comprehensive online learning library for M

Re: [Matplotlib-users] How to plot Chebyshev polynolmials

2012-01-10 Thread Daniel Hyams
Regardless of exactly which polynomial you are after, I've showed you how to plot a cheb. poly. Can you not work with the code given and plot the exact variation of polynomial you want? On Tue, Jan 10, 2012 at 9:46 AM, Fabien Lafont wrote: > No I just want to plot the third Shebitchev polynomi

Re: [Matplotlib-users] How to plot Chebyshev polynolmials

2012-01-10 Thread Fabien Lafont
No I just want to plot the third Shebitchev polynomial. 2012/1/10 Daniel Hyams : > I think that you're misusing Chebyshev (do you really only want to give "3" > as a coefficient..which is just the constant function 3), and you have to > evaluate it in order to give matplotlib some x and y data to

Re: [Matplotlib-users] How to plot Chebyshev polynolmials

2012-01-10 Thread Daniel Hyams
I think that you're misusing Chebyshev (do you really only want to give "3" as a coefficient..which is just the constant function 3), and you have to evaluate it in order to give matplotlib some x and y data to plot. from matplotlib import pyplot as plt import numpy as np x = np.linspace(-1.0,1.0

[Matplotlib-users] How to plot Chebyshev polynolmials

2012-01-10 Thread Fabien Lafont
I'm trying to plot Chebyshev polynolmials using: numpy.polynomial.Chebyshev: import math from numpy import * from numpy import polynomial as pol from pylab import * from scipy import * from scipy import optimize import warnings warnings.simplefilter('ignore', np.RankWarning) test = pol.Chebyshe

Re: [Matplotlib-users] How to plot heatmap with matplotlib?

2011-09-29 Thread fdu.xia...@gmail.com
On 2011-9-26 16:02, Angus McMorland wrote: On 25 September 2011 06:59, fdu.xia...@gmail.com wrote: Dear all, Heatmap (like those on the page http://www2.warwick.ac.uk/fac/sci/moac/students/peter_cock/r/heatmap/) is a frequently used type of image in microarray data analysis. However, it seems

Re: [Matplotlib-users] How to plot heatmap with matplotlib?

2011-09-26 Thread Angus McMorland
On 25 September 2011 06:59, fdu.xia...@gmail.com wrote: > Dear all, > > Heatmap (like those on the page > http://www2.warwick.ac.uk/fac/sci/moac/students/peter_cock/r/heatmap/) > is a frequently used type of image in microarray data analysis. However, > it seems there are no convenient functions i

[Matplotlib-users] How to plot heatmap with matplotlib?

2011-09-25 Thread fdu.xia...@gmail.com
Dear all, Heatmap (like those on the page http://www2.warwick.ac.uk/fac/sci/moac/students/peter_cock/r/heatmap/) is a frequently used type of image in microarray data analysis. However, it seems there are no convenient functions in matplotlib to plot heatmap (please correct me if I was wrong

[Matplotlib-users] How to plot heatmap with matplotlib?

2011-09-25 Thread fdu.xia...@gmail.com
Dear all, Heatmap (like those on the page http://www2.warwick.ac.uk/fac/sci/moac/students/peter_cock/r/heatmap/) is a frequently used type of image in microarray data analysis. However, it seems there are no convenient functions in matplotlib to plot heatmap (please correct me if I was wrong),

Re: [Matplotlib-users] How to plot a set of line segments

2010-12-10 Thread John Salvatier
Ah, yes, I should have added that I have a lot of them, so this seems like improper usage. I found the collections.LineCollection class which sounds like what I want. Thank you for the help, John On Fri, Dec 10, 2010 at 12:34 PM, Chloe Lewis wrote: > You can plot them all individually; e.g. > >

Re: [Matplotlib-users] How to plot a set of line segments

2010-12-10 Thread Chloe Lewis
You can plot them all individually; e.g. rec = ([1,2,.5], [0.5, 3, 1.1], [5, 7, .2]) for r in rec: pylab.plot( r[:2], [r[2]]*2) On Dec 10, 2010, at 12:13 PM, John Salvatier wrote: > I have a set of records with (start, end, value) values. Basically > they represent "we had this value betw

[Matplotlib-users] How to plot a set of line segments

2010-12-10 Thread John Salvatier
I have a set of records with (start, end, value) values. Basically they represent "we had this value between these two times". The end of one record is not necessarily the end of another record. I would like to plot a set of line segments with end points (x=start, y= value) and (x=end, y=value),

Re: [Matplotlib-users] how to plot contour on a regular grid with mask ?

2010-09-18 Thread Forest Yang
Thanks, that works fantastically ! -- Forest. On Fri, Sep 17, 2010 at 9:23 PM, Benjamin Root wrote: > On Fri, Sep 17, 2010 at 8:05 PM, Forest Yang wrote: >> >> Hi >> >>   I have a function z(x, y) on a regular grid. But some of the value >> z are not defined on (x,y). I want to plot the contour

Re: [Matplotlib-users] how to plot contour on a regular grid with mask ?

2010-09-17 Thread Benjamin Root
On Fri, Sep 17, 2010 at 8:05 PM, Forest Yang wrote: > Hi > > I have a function z(x, y) on a regular grid. But some of the value > z are not defined on (x,y). I want to plot the contour or contourf of > z on (x,y) but exclude specific (x,y) points. > How can I do it ? Right now I just draw small

[Matplotlib-users] how to plot contour on a regular grid with mask ?

2010-09-17 Thread Forest Yang
Hi I have a function z(x, y) on a regular grid. But some of the value z are not defined on (x,y). I want to plot the contour or contourf of z on (x,y) but exclude specific (x,y) points. How can I do it ? Right now I just draw small colored square (rectangular) around defined (x,y) the color is

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread Robert Kern
On 7/9/10 10:31 AM, per freem wrote: > Also, I am not sure how to use alan's code. > > If I try: > > ec = empirical_cdf(my_data) > plt.plot(ec) > > it doesn't actually look like a cdf Make sure my_data is sorted first. plt.plot(my_data, ec) You probably want to use one of the "steps" linestyles;

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread per freem
Also, I am not sure how to use alan's code. If I try: ec = empirical_cdf(my_data) plt.plot(ec) it doesn't actually look like a cdf On Fri, Jul 9, 2010 at 10:17 AM, per freem wrote: > How does Alan's code compare with using cumfreq and then plotting its > result?  Is the only difference that cu

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread per freem
How does Alan's code compare with using cumfreq and then plotting its result? Is the only difference that cumfreq bins the data? On Fri, Jul 9, 2010 at 10:12 AM, Robert Kern wrote: > On 7/9/10 10:02 AM, per freem wrote: >> I'd like to clarify: I want the empirical cdf, but I want it to be >> nor

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread Robert Kern
On 7/9/10 10:02 AM, per freem wrote: > I'd like to clarify: I want the empirical cdf, but I want it to be > normalized. There's a normed=True option to plt.hist but how can I do > the equivalent for CDFs? There is no such thing as a normalized empirical CDF. Or rather, there is no such thing as

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread per freem
I'd like to clarify: I want the empirical cdf, but I want it to be normalized. There's a normed=True option to plt.hist but how can I do the equivalent for CDFs? On Fri, Jul 9, 2010 at 9:14 AM, Alan G Isaac wrote: > On 7/9/2010 12:02 AM, per freem wrote: >>  How can I plot the empirical CDF of a

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread Alan G Isaac
On 7/9/2010 12:02 AM, per freem wrote: > How can I plot the empirical CDF of an array of numbers in matplotlib > in Python? I recalled David Huard posted the below, which apparently was once in the sandbox... hth, Alan Isaac def empiricalcdf(data, method='Hazen'): """Return the empirical

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread Matthias Michler
On Friday July 9 2010 06:02:58 per freem wrote: > How can I plot the empirical CDF of an array of numbers in matplotlib > in Python? I'm looking for the cdf analog of pylab's "hist" function. > > One thing I can think of is: > > from scipy.stats import cumfreq > a = array([...]) # my array of num

[Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-08 Thread per freem
How can I plot the empirical CDF of an array of numbers in matplotlib in Python? I'm looking for the cdf analog of pylab's "hist" function. One thing I can think of is: from scipy.stats import cumfreq a = array([...]) # my array of numbers num_bins = 20 b = cumfreq(a, num_bins) plt.plot(b) Is t

Re: [Matplotlib-users] how to plot a Polygon / plt.draw() problem

2010-04-12 Thread tomislav_ma...@gmx.com
users] how to plot a Polygon / plt.draw() problem On Sun, Apr 11, 2010 at 7:15 AM, tomislav_ma...@gmx.com wrote: > can someone help me to plot a polygon in matplotlib? > > I have been reading about the axes.patches.Polygon class and I have defined > the > > Polygon object that has

Re: [Matplotlib-users] how to plot a Polygon / plt.draw() problem

2010-04-12 Thread Friedrich Romstedt
2010/4/11 Alan G Isaac : > On 4/11/2010 9:27 AM, Friedrich Romstedt wrote: >> I think you can use Tk via the Tkinter Python package.  On linux I >> heard it's looking a bit weird, but as a starting points it's easy >> enough. > > Weird how? > Will that be fixed with the new release (ttk, in Python

Re: [Matplotlib-users] how to plot a Polygon / plt.draw() problem

2010-04-11 Thread John Hunter
On Sun, Apr 11, 2010 at 7:15 AM, tomislav_ma...@gmx.com wrote: > can someone help me to plot a polygon in matplotlib? > > I have been reading about the axes.patches.Polygon class and I have defined > the > > Polygon object that has a preset lw and points. How do I plot it? > > I'm confused because

Re: [Matplotlib-users] how to plot a Polygon / plt.draw() problem

2010-04-11 Thread Alan G Isaac
On 4/11/2010 9:27 AM, Friedrich Romstedt wrote: > I think you can use Tk via the Tkinter Python package. On linux I > heard it's looking a bit weird, but as a starting points it's easy > enough. Weird how? Will that be fixed with the new release (ttk, in Python 2.7)? Thanks, Alan Isaac ---

Re: [Matplotlib-users] how to plot a Polygon / plt.draw() problem

2010-04-11 Thread Friedrich Romstedt
2010/4/11 tomislav_ma...@gmx.com : > can someone help me to plot a polygon in matplotlib? > I have been reading about the axes.patches.Polygon class and I have defined > the > Polygon object that has a preset lw and points. How do I plot it? Here http://matplotlib.sourceforge.net/api/axes_api.htm

[Matplotlib-users] how to plot a Polygon / plt.draw() problem

2010-04-11 Thread tomislav_ma...@gmx.com
Hi everyone, can someone help me to plot a polygon in matplotlib? I have been reading about the axes.patches.Polygon class and I have defined the Polygon object that has a preset lw and points. How do I plot it? I'm confused because the Axes documentation states that this class holds most of

Re: [Matplotlib-users] how to plot data on image.

2010-02-18 Thread John Hunter
On Thu, Feb 18, 2010 at 2:01 AM, yogesh karpate wrote: > Dear All, >   I am facing one peculiar problem. I have ecg data of 2000 > points . I can plot it,but i want to plot the data on image . Kindly find > the attched image with this mail to get my problem.How should I go ahead. >

[Matplotlib-users] how to plot data on image.

2010-02-18 Thread yogesh karpate
Dear All, I am facing one peculiar problem. I have ecg data of 2000 points . I can plot it,but i want to plot the data on image . Kindly find the attched image with this mail to get my problem.How should I go ahead. Thanx in advance. Regards Yogesh <>-

[Matplotlib-users] how to plot data on image.

2010-02-18 Thread yogesh karpate
Dear All, I am facing one peculiar problem. I have ecg data of 2000 points . I can plot it,but i want to plot the data on image . Kindly find the attched image with this mail to get my problem.How should I go ahead. Thanx in advance. Regards Yogesh <>-

[Matplotlib-users] How to plot saved plot data in a new figure?

2009-09-18 Thread Michael McNeil Forbes
Hi, Is there a standard way to compute first and then plot something later? For example, I would like to generate a fine contour plot, then use it as a background later. x = np.linspace(-1,1,1000) X,Y = np.meshgrid(x,x) Z = ((X*X + Y*Y) - 0.5)**2 + Y**2 contours = plt.contour(X,Y,Z,100) # T

[Matplotlib-users] how to plot in discontinued Y-axis

2009-07-01 Thread Forrest Sheng Bao
Hi, I am thinking about a plotting problem with the data set like this: [3,2,4,100,5] If I plot this list, then 100 will be very high and 3, 2, 4 and 5 will be almost near 0. So, can I use a discontinued Y-axis, which has two ranges, from 0 to 10 and from 90 to 110. Of course, there needs a tear

Re: [Matplotlib-users] How to plot 2d histogram with the same scale!!

2009-04-13 Thread Jouni K . Seppänen
siz siz writes: > I have 2 plots and want them have the same colorbar scale so that I > could compare the minima or maxima. You can do it like this: mn = min(data1.min(), data2.min()) mx = max(data1.max(), data2.max()) norm = matplotlib.colors.Normalize(mn, mx) figure(); contourf(data1, norm=no

[Matplotlib-users] How to plot 2d histogram with the same scale!!

2009-04-12 Thread siz siz
Hi all,I want to use contourf function in matplotlib to plot 2D free energy histogram for my research. I have 2 plots and want them have the same colorbar scale so that I could compare the minima or maxima. I've been looking at colorbar doc but i can not find a solution. I always gets 2 different c

Re: [Matplotlib-users] How to plot straight lines on polar plots

2009-01-30 Thread John Hunter
On Fri, Jan 30, 2009 at 12:28 AM, jamesf0 wrote: > > Sorry, I have done that change, and get these errors: > > > Traceback (most recent call last): > File "test7.py", line 36, in >ax=fig.add_subplot(111, polar=True, resolution=1) > File "/usr/lib/python2.5/site-packages/matplotlib/figure.py

Re: [Matplotlib-users] How to plot straight lines on polar plots

2009-01-29 Thread jamesf0
Sorry, I have done that change, and get these errors: Traceback (most recent call last): File "test7.py", line 36, in ax=fig.add_subplot(111, polar=True, resolution=1) File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 676, in add_subplot a = subplot_class_factory(pr

Re: [Matplotlib-users] How to plot straight lines on polar plots

2009-01-29 Thread Jouni K . Seppänen
jamesf0 writes: > Thanks for the help, but I can't quite see where to add the add_axes code. > Here is the code I have been using to plot, the polar plot is a subplot. > ax=fig.add_subplot(111, polar=True) Change this to ax=fig.add_subplot(111, polar=True, resolution=1) and the resolution w

Re: [Matplotlib-users] How to plot straight lines on polar plots

2009-01-29 Thread jamesf0
Yeah "trying" to plot sun paths. I'll be more than happy to share once it's complete. James. Timmie wrote: > > Hello, > I am trying to create a plot that resembles the layout of the chart seen below: http://www.nabble.com/file/p21721073/brisbane.png > are you actual

Re: [Matplotlib-users] How to plot straight lines on polar plots

2009-01-29 Thread Tim Michelsen
Hello, >>> I am trying to create a plot that resembles the layout of the chart seen >>> below: >>> >>> http://www.nabble.com/file/p21721073/brisbane.png are you actually trying to plot sun path digrams? May you share a part of your code once it is completed? I'd be very interested in seeing a w

Re: [Matplotlib-users] How to plot straight lines on polar plots

2009-01-29 Thread jamesf0
Thanks for the help, but I can't quite see where to add the add_axes code. Here is the code I have been using to plot, the polar plot is a subplot. fig=figure() ax=fig.add_subplot(111, polar=True) ax.set_xticklabels(["E",45,"N",315,"W",225,"S",135]) ax.set_yticklabels([80,70,60,50,40,30,20,10])

Re: [Matplotlib-users] How to plot straight lines on polar plots

2009-01-29 Thread Michael Droettboom
I'm embarrassed to see that I neglected to document this, but you can pass a "resolution" keyword argument to add_axes which sets the number of points of interpolation between each pair of data points. Set this to 1 to disable interpolation. This will be documented shortly. Mike jamesf0 wrot

Re: [Matplotlib-users] How to plot straight lines on polar plots

2009-01-29 Thread Jae-Joon Lee
I don't see any elegant way to do that. The easiest way I can think of is to use a derived line2d class. Something like below will work. Others may have better ideas. import matplotlib.lines class Line2DNoInterpolation(matplotlib.lines.Line2D): def recache(self): matplotlib.lines.L

[Matplotlib-users] How to plot straight lines on polar plots

2009-01-29 Thread jamesf0
Hi, Im having some trouble with this "seemingly" simple task of plotting straight lines/fitted curves on a polar plot. I am trying to create a plot that resembles the layout of the chart seen below: http://www.nabble.com/file/p21721073/brisbane.png So far I have only been able to plot data

[Matplotlib-users] how to plot curve between two points

2008-11-01 Thread Amitava Maity
Hello, Given a set of points: (x1, y1), (x2, y2), (x3, y3), (x4, y4), How do plot a curve y = sinh(x) between (x1, y1) and (x2, y2) and then between (x2, y2) and (x3, y3) and so on .? Thanks in advance, AMaity. --

Re: [Matplotlib-users] How to plot only points which lie in a certain range

2008-10-30 Thread Pierre GM
On Monday 27 October 2008 18:40:07 marcusantonius wrote: > I'm sorry for this newbie question. I have a data file consisting of 3 > columns, and want to plot the first versus the second column, but only if > the parameter in the third column lies in a certain range. Does somebody > have an idea how

Re: [Matplotlib-users] How to plot only points which lie in a certain range

2008-10-27 Thread brett . mcsweeney
traint. Produces an array 's' of boolean values plot(x[s], y[s]) # will plot only those x,y pairs for which s is True marcusantonius <[EMAIL PROTECTED]> 28/10/2008 09:40 AM To matplotlib-users@lists.sourceforge.net cc Subject [Matplotlib-users] How to plot only points whi

[Matplotlib-users] How to plot only points which lie in a certain range

2008-10-27 Thread marcusantonius
I'm sorry for this newbie question. I have a data file consisting of 3 columns, and want to plot the first versus the second column, but only if the parameter in the third column lies in a certain range. Does somebody have an idea how to do that? -- View this message in context: http://www.nabbl

Re: [Matplotlib-users] How to plot 2 data series against the same time series using plot_date?

2008-04-03 Thread frigoris . ma
On 4/4/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Dear all, > > I would like to plot two different data series against a common > time-series, e.g. dataset 1 is the precipitation data around a year at > City 1, and dataset 2 is the precipitation of the same year taken at > City 2. They

[Matplotlib-users] How to plot 2 data series against the same time series using plot_date?

2008-04-03 Thread frigoris . ma
Dear all, I would like to plot two different data series against a common time-series, e.g. dataset 1 is the precipitation data around a year at City 1, and dataset 2 is the precipitation of the same year taken at City 2. They share a common x-axis. My goal is to draw the two lines in the same sub

Re: [Matplotlib-users] how to plot

2007-04-02 Thread Steve Schmerler
massimo sandal wrote: > javi markez bigara ha scritto: >> hi everyone, >> i would like to know how to plot several linear regresions with the >> same group of points Don't understand exactly what you want to do ... > > what do you mean? > > however, if you dig the matplotlib and the scipy

Re: [Matplotlib-users] how to plot

2007-04-02 Thread massimo sandal
javi markez bigara ha scritto: hi everyone, i would like to know how to plot several linear regresions with the same group of points THANKS IN ADVANCE what do you mean? however, if you dig the matplotlib and the scipy documentation, you'll find (a)how to plot points (easy) (b)how to cal

[Matplotlib-users] how to plot

2007-04-02 Thread javi markez bigara
hi everyone, i would like to know how to plot several linear regresions with the same group of points THANKS IN ADVANCE _ Descubre la descarga digital con MSN Music. Más de un millón de canciones. http://music.msn.es/ ---

[Matplotlib-users] How to plot two graphs in two different windows at the same time?

2006-09-28 Thread zhangh1
Hi, Is there any way to plot two graphs in two different windows at the same time? The reason for doing this is that I wanted to update a graph automatically in a for loop, but it turned out that the first figure has to closed manually. Any suggestion for that is also greatly appreciated. Best Rega