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

[Matplotlib-users] Modifying contours

2009-01-29 Thread Thomas Robitaille
Hi all, I am trying to do the following to produce a customized contour plot: 1. Create a ContourSet from contour() 2. Retrieve vertex positions from this ContourSet 3. Modify the vertex positions by applying a coordinate transformation 4. Apply the changes to the ContourSet 5. Plot the ContourSe

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] Plot only inside a disc

2009-01-29 Thread projetmbc
>> Thanks, your example works but what I must do so to plot for example y=cos x >> ? I'm a very beginner. > > line, = ax.plot(x, np.cos(x)) > patch = patches.Circle((300,300), radius=100) > line.set_clip_path(patch) > >Everything in the matplotlib figure is an "Artist" (lines, images, >text, re

Re: [Matplotlib-users] universal_newline in matplotlib 0.91.2?

2009-01-29 Thread Jeff Whitaker
Christopher Barker wrote: > Jeff Whitaker wrote: >> Chris: Here's a self-contained example of the problem (data file >> attached): > > yup -- I get the same problem. Interesting, I thought it might be an > issue with the 'U' flag creating a difference in byte offset, but > that's a unix style f

Re: [Matplotlib-users] universal_newline in matplotlib 0.91.2?

2009-01-29 Thread Christopher Barker
getting carried away here... I took a look at the Python SVN (2.5.4 and 2.6.1) for the gzip lib. I see this: # guarantee the file is opened in binary mode on platforms # that care about that sort of thing if mode and 'b' not in mode: mode += 'b'

Re: [Matplotlib-users] Plot only inside a disc

2009-01-29 Thread John Hunter
On Thu, Jan 29, 2009 at 1:40 PM, wrote: > Thanks, your example works but what I must do so to plot for example y=cos x > ? I'm a very beginner. line, = ax.plot(x, np.cos(x)) patch = patches.Circle((300,300), radius=100) line.set_clip_path(patch) Everything in the matplotlib figure is an "

Re: [Matplotlib-users] universal_newline in matplotlib 0.91.2?

2009-01-29 Thread Christopher Barker
Jeff Whitaker wrote: > Chris: Here's a self-contained example of the problem (data file > attached): yup -- I get the same problem. Interesting, I thought it might be an issue with the 'U' flag creating a difference in byte offset, but that's a unix style file already, so it should make no dif

Re: [Matplotlib-users] Plot only inside a disc

2009-01-29 Thread projetmbc
Title: Flashmail Thanks, your example works but what I must do so to plot for example y=cos x ? I'm a very beginner.   Christophe. Message d'origine >Date: Thu, 29 Jan 2009 09:34:11 -0600 >Sujet: Re: [Matplotlib-users] Plot only inside a disc >De: John Hunter >A: projet...@club-internet

Re: [Matplotlib-users] universal_newline in matplotlib 0.91.2?

2009-01-29 Thread Jeff Whitaker
Christopher Barker wrote: Jeff Whitaker wrote: John: 'rU' apparently doesn't work for gzipped text files (at least in python 2.5.2). I had to change the default in back to 'r' when using gzip.open (r6846 in trunk). darn -- sounds like a bug/missing feature in the gzip module. Strange , th

Re: [Matplotlib-users] universal_newline in matplotlib 0.91.2?

2009-01-29 Thread Jeff Whitaker
Christopher Barker wrote: > Jeff Whitaker wrote: > >> John: 'rU' apparently doesn't work for gzipped text files (at least >> in python 2.5.2). I had to change the default in back to 'r' when >> using gzip.open (r6846 in trunk). > > darn -- sounds like a bug/missing feature in the gzip module. S

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

Re: [Matplotlib-users] universal_newline in matplotlib 0.91.2?

2009-01-29 Thread Christopher Barker
Christopher Barker wrote: > here are my test files -- just to save you a minute if you want to try > it yourself. oops -- the email process "fixed" the mixed newlines in test_newlines.txt! At least with my client. It's probably work if you unpack the gz though. -Chris -- Christopher Barke

Re: [Matplotlib-users] universal_newline in matplotlib 0.91.2?

2009-01-29 Thread Christopher Barker
here are my test files -- just to save you a minute if you want to try it yourself. -CHB -- 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

Re: [Matplotlib-users] universal_newline in matplotlib 0.91.2?

2009-01-29 Thread Christopher Barker
C Lewis wrote: > So one argument is that there's > no good reason to risk breaking old defaults, As far as I can see, this won't break any code, though -- Universal newlines won't change anything with native newlines anyway. except maybe with the gzip module... -Chris -- Christopher Barker,

Re: [Matplotlib-users] universal_newline in matplotlib 0.91.2?

2009-01-29 Thread Christopher Barker
Jeff Whitaker wrote: > John: 'rU' apparently doesn't work for gzipped text files (at least in > python 2.5.2). I had to change the default in back to 'r' when using > gzip.open (r6846 in trunk). darn -- sounds like a bug/missing feature in the gzip module. Strange , though, unknown flags see

Re: [Matplotlib-users] universal_newline in matplotlib 0.91.2?

2009-01-29 Thread C Lewis
To put in an argument each way -- I now recognize that the PEP one gets when looking up "universal newline python" has the necessary info. I saw but did not recognize over the weekend. So one argument is that there's no good reason to risk breaking old defaults, mostly users will be able to

Re: [Matplotlib-users] universal_newline in matplotlib 0.91.2?

2009-01-29 Thread Jeff Whitaker
John Hunter wrote: > 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 s

Re: [Matplotlib-users] Plot only inside a disc

2009-01-29 Thread John Hunter
On Thu, Jan 29, 2009 at 9:19 AM, wrote: > Hello, > I would like to make a kind of magnifying glass. So I need to have a piece of > a graph and I would like it to have the form of a disc rather than of a box. > So is-it possible to only draw in a disc (I'm searching for a fast way to do > that) ?

[Matplotlib-users] Plot only inside a disc

2009-01-29 Thread projetmbc
Hello, I would like to make a kind of magnifying glass. So I need to have a piece of a graph and I would like it to have the form of a disc rather than of a box. So is-it possible to only draw in a disc (I'm searching for a fast way to do that) ? Best regards. Christophe. -

Re: [Matplotlib-users] matplotlib cairo backend

2009-01-29 Thread John Hunter
On Thu, Jan 29, 2009 at 3:43 AM, Oliver Marks wrote: > are there any tutorials / examples / documentation on the use of the > cairo backend i am currently using gtk and want to work with cairo for > printing. > > I have looked around and not found much information on this backend. In general, you

[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

Re: [Matplotlib-users] tgif

2009-01-29 Thread dikshie
On Wed, Jan 28, 2009 at 9:29 PM, Jeff Whitaker wrote: > 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

[Matplotlib-users] matplotlib cairo backend

2009-01-29 Thread Oliver Marks
are there any tutorials / examples / documentation on the use of the cairo backend i am currently using gtk and want to work with cairo for printing. I have looked around and not found much information on this backend. signature.asc Description: This is a digitally signed message part --

[Matplotlib-users] Ploting inequalities like x**3+y**2<=3

2009-01-29 Thread projetmbc
hello, I would like to know if there is a way to draw something like x**3+y**2<=3. If there is not a direct way to do that, I would like to know if it could be possible to subclass the method that plots the contours. Best regards. Christophe. ---

Re: [Matplotlib-users] Ploting f(x;y)=0

2009-01-29 Thread projetmbc
>On Jan 28, 2009, at 8:26 AM, projet...@club-internet.fr 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]