You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(1) |
2
(4) |
3
(12) |
|
4
(5) |
5
(30) |
6
(21) |
7
(20) |
8
(11) |
9
(9) |
10
(12) |
|
11
(11) |
12
(22) |
13
(22) |
14
(38) |
15
(25) |
16
(23) |
17
(20) |
|
18
(7) |
19
(13) |
20
(13) |
21
(18) |
22
(6) |
23
(7) |
24
(4) |
|
25
(9) |
26
(35) |
27
(37) |
28
(22) |
29
(27) |
30
(12) |
31
(4) |
|
From: <pro...@cl...> - 2009-01-29 19:40:51
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<title>Flashmail</title>
<style type="text/css">
BODY, TABLE, TR, TD, P {margin:0;padding:0;}
BODY {background:#FFFFFF;}
</style>
</head>
<body>
<P>Thanks, your example works but what I must do so to plot for example y=cos x ? I'm a very beginner.</P>
<P> </P>
<P>Christophe.</P>
<P><BR>----Message d'origine---- <BR>>Date: Thu, 29 Jan 2009 09:34:11 -0600 <BR>>Sujet: Re: [Matplotlib-users] Plot only inside a disc <BR>>De: John Hunter <BR>>A: pro...@cl... <BR>>Copie à: mat...@li... <BR>> <BR>>On Thu, Jan 29, 2009 at 9:19 AM, <PRO...@CL...>wrote: <BR>>> Hello, <BR>>> I would like to make a kind of magnifying glass. So I need to have a piece of <BR>>> a graph and I would like it to have the form
of a disc rather than of a box. <BR>>> So is-it possible to only draw in a disc (I'm searching for a fast way to do <BR>>> that) ? <BR>> <BR>>You can turn off the rendering of the normal axes and axis, and clip <BR>>your data to an arbitrary patch or path; eg <BR>> <BR>> <BR>> """ <BR>> Clipping to arbitrary patches and paths <BR>> """ <BR>> import numpy as np <BR>> import matplotlib.pyplot as plt <BR>> import matplotlib.path as path <BR>> import matplotlib.
patches as patches <BR>> <BR>> <BR>> fig = plt.figure() <BR>> ax = fig.add_subplot(111, frameon=False, xticks=[], yticks=[]) <BR>> <BR>> im = ax.imshow(np.random.rand(10,10)) <BR>> <BR>> patch = patches.Circle((300,300), radius=100) <BR>> im.set_clip_path(patch) <BR>> <BR>> plt.show() <BR>> </P></body></html>
|
|
From: Jeff W. <js...@fa...> - 2009-01-29 19:01:54
|
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
> , though, unknown flags seem to be ignored by file(), and gzip.open
> seems to ignore the 'U' too, in my tests (see below).
>
> I think having the 'U' ignored is less than optimal, but doesn't make
> anything worse than it is. What problems did you have?
Chris: Here's a self-contained example of the problem (data file attached):
>> import gzip
>> f = gzip.open('etopo20lats.gz','rU')
>> print f.readline()
Traceback (most recent call last):
File "testread.py", line 3, in <module>
print f.readline()
File "/sw/lib/python2.5/gzip.py", line 399, in readline
c = self.read(readsize)
File "/sw/lib/python2.5/gzip.py", line 227, in read
self._read(readsize)
File "/sw/lib/python2.5/gzip.py", line 279, in _read
uncompress = self.decompress.decompress(buf)
zlib.error: Error -3 while decompressing: invalid distance too far back
>> import gzip
>> f = gzip.open('etopo20lats.gz','r')
>> print f.readline()
'-8.983333330000000672e+01'
-Jeff
>
> tests (on an OS-X system - native unix newlines):
> (python 2.5.2)
>
> >>> file('test_newlines.txt', 'rb').read()
> 'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
> >>> file('test_newlines.txt', 'r').read()
> 'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
> >>> file('test_newlines.txt', 'U').read()
> 'line 1: unix \nline 2: dos \nline 3: mac \nline 4: unix \n'
>
> # so file() does the right thing
>
> >>> gzip.open('test_newlines.txt.gz', 'rb').read()
> 'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
> >>> gzip.open('test_newlines.txt.gz', 'r').read()
> 'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
> >>> gzip.open('test_newlines.txt.gz', 'rU').read()
> 'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
>
>
> # gzip.open() appears to ignore the 'U' flag -- too bad!
>
> should we post a bug report/feature request to Python?
>
> -Chris
>
>
>
>
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
|
|
From: Jeff W. <js...@fa...> - 2009-01-29 18:38:46
|
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
> , though, unknown flags seem to be ignored by file(), and gzip.open
> seems to ignore the 'U' too, in my tests (see below).
>
> I think having the 'U' ignored is less than optimal, but doesn't make
> anything worse than it is. What problems did you have?
Chris: If you have basemap, try running the simpletest.py example with
matplotlib svn r6845. When the filehandle is obtained using 'rU', it's
reading garbage from the gzipped file. Using 'r', it's fine.
-Jeff
>
> tests (on an OS-X system - native unix newlines):
> (python 2.5.2)
>
> >>> file('test_newlines.txt', 'rb').read()
> 'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
> >>> file('test_newlines.txt', 'r').read()
> 'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
> >>> file('test_newlines.txt', 'U').read()
> 'line 1: unix \nline 2: dos \nline 3: mac \nline 4: unix \n'
>
> # so file() does the right thing
>
> >>> gzip.open('test_newlines.txt.gz', 'rb').read()
> 'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
> >>> gzip.open('test_newlines.txt.gz', 'r').read()
> 'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
> >>> gzip.open('test_newlines.txt.gz', 'rU').read()
> 'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
>
>
> # gzip.open() appears to ignore the 'U' flag -- too bad!
>
> should we post a bug report/feature request to Python?
>
> -Chris
>
>
>
>
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
|
|
From: Jae-Joon L. <lee...@gm...> - 2009-01-29 18:36:48
|
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.Line2D.recache(self)
self._transformed_path.get_transformed_path_and_affine = \
self._transformed_path.get_transformed_points_and_affine
ax = subplot(111, projection="polar")
r = np.arange(0, 1.0, 0.1)
theta = 2*np.pi*r
p2 = Line2DNoInterpolation(theta, r, color='r', lw=1)
ax.add_line(p2)
-JJ
On Thu, Jan 29, 2009 at 12:20 AM, jamesf0 <ja...@ut...> wrote:
>
> 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 like so:
>
> http://www.nabble.com/file/p21721073/AzvAlt.png
>
>
> The blue line should be similar to the bottom line of the first example
> plot. The line would ultimately be formed by fitting a straight line/curve
> through the points, instead of the way matplotlib is plotting.
>
> I am plotting tuples of values (az and alt), and plotting using:
>
>
> ax.plot(az, alt, 'b')
> --
> View this message in context: http://www.nabble.com/How-to-plot-straight-lines-on-polar-plots-tp21721073p21721073.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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Christopher B. <Chr...@no...> - 2009-01-29 18:21:15
|
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 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 Chr...@no... |
|
From: Christopher B. <Chr...@no...> - 2009-01-29 18:09:54
|
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 main reception Chr...@no... |
|
From: Christopher B. <Chr...@no...> - 2009-01-29 18:02:50
|
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, 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 Chr...@no... |
|
From: Christopher B. <Chr...@no...> - 2009-01-29 18:00:54
|
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 seem to be ignored by file(), and gzip.open seems
to ignore the 'U' too, in my tests (see below).
I think having the 'U' ignored is less than optimal, but doesn't make
anything worse than it is. What problems did you have?
tests (on an OS-X system - native unix newlines):
(python 2.5.2)
>>> file('test_newlines.txt', 'rb').read()
'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
>>> file('test_newlines.txt', 'r').read()
'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
>>> file('test_newlines.txt', 'U').read()
'line 1: unix \nline 2: dos \nline 3: mac \nline 4: unix \n'
# so file() does the right thing
>>> gzip.open('test_newlines.txt.gz', 'rb').read()
'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
>>> gzip.open('test_newlines.txt.gz', 'r').read()
'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
>>> gzip.open('test_newlines.txt.gz', 'rU').read()
'line 1: unix \nline 2: dos \r\nline 3: mac \rline 4: unix \n'
# gzip.open() appears to ignore the 'U' flag -- too bad!
should we post a bug report/feature request to Python?
-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
Chr...@no...
|
|
From: C L. <ch...@na...> - 2009-01-29 16:47:50
|
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 solve it themselves.
...*but*, on the other hand:
I've checked that more than one Office 2008 install writes files
csv2rec can't open without the 'U' flag,
and I'm trying to persuade various colleagues that they can move
from Excel calculations to Python gradually,
and they aren't going to expect line-ending problems.
So I guess I see a backwards compatibility problem balanced against a
forward evangelizing problem.
&C
On Jan 29, 2009, at 8:18 AM, Jeff Whitaker wrote:
> John Hunter wrote:
>> On Wed, Jan 28, 2009 at 2:11 PM, Christopher Barker
>> <Chr...@no...> 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
>>
|
|
From: Jeff W. <js...@fa...> - 2009-01-29 16:18:38
|
John Hunter wrote: > On Wed, Jan 28, 2009 at 2:11 PM, Christopher Barker > <Chr...@no...> 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 > > 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). -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: John H. <jd...@gm...> - 2009-01-29 15:34:15
|
On Thu, Jan 29, 2009 at 9:19 AM, <pro...@cl...> 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) ?
You can turn off the rendering of the normal axes and axis, and clip
your data to an arbitrary patch or path; eg
"""
Clipping to arbitrary patches and paths
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.path as path
import matplotlib.patches as patches
fig = plt.figure()
ax = fig.add_subplot(111, frameon=False, xticks=[], yticks=[])
im = ax.imshow(np.random.rand(10,10))
patch = patches.Circle((300,300), radius=100)
im.set_clip_path(patch)
plt.show()
|
|
From: <pro...@cl...> - 2009-01-29 15:19:37
|
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. |
|
From: John H. <jd...@gm...> - 2009-01-29 12:07:10
|
On Thu, Jan 29, 2009 at 3:43 AM, Oliver Marks
<Oli...@ho...> 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 don't need to know much about a backed to use it, just
switch to that backend by either doing
import matplotlib
matplotlib.use('Cairo')
at the top of your script (before importing pylab/pyplot) or making it
permanent in your rc file. See
http://matplotlib.sourceforge.net/users/customizing.html
http://matplotlib.sourceforge.net/faq/installing_faq.html#id1
You can also use cairo rendering in a gtk window by selecting the
GTKCairo backend.
JDH
|
|
From: dikshie <di...@gm...> - 2009-01-29 11:26:47
|
On Wed, Jan 28, 2009 at 9:29 PM, Jeff Whitaker <js...@fa...> 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 is > not an image format, and matplotlib cannot read or write it. yes, that's what i mean. tgif :) thanks! -dikshie- |
|
From: Oliver M. <Oli...@ho...> - 2009-01-29 09:59:25
|
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. |
|
From: <pro...@cl...> - 2009-01-29 08:57:08
|
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. |
|
From: <pro...@cl...> - 2009-01-29 08:53:38
|
>On Jan 28, 2009, at 8:26 AM, pro...@cl... 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 Thanks, this works well with the following minor changes. import numpy as np import matplotlib.pyplot as plt x, y = np.mgrid[-10:10:50j, -10:10:50j] f = x*np.sin(y) + y * np.sin(x) -4.0 plt.contour(x, y, f, (0,)) plt.show() |
|
From: jamesf0 <ja...@ut...> - 2009-01-29 05:21:07
|
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 like so: http://www.nabble.com/file/p21721073/AzvAlt.png The blue line should be similar to the bottom line of the first example plot. The line would ultimately be formed by fitting a straight line/curve through the points, instead of the way matplotlib is plotting. I am plotting tuples of values (az and alt), and plotting using: ax.plot(az, alt, 'b') -- View this message in context: http://www.nabble.com/How-to-plot-straight-lines-on-polar-plots-tp21721073p21721073.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: John H. <jd...@gm...> - 2009-01-28 20:53:18
|
On Wed, Jan 28, 2009 at 9:42 AM, Rob Hetland <he...@ta...> 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. |
|
From: John H. <jd...@gm...> - 2009-01-28 20:39:51
|
On Wed, Jan 28, 2009 at 2:11 PM, Christopher Barker <Chr...@no...> 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 |
|
From: Christopher B. <Chr...@no...> - 2009-01-28 20:11:31
|
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 Chr...@no... |
|
From: Rob H. <he...@ta...> - 2009-01-28 19:04:07
|
On Jan 28, 2009, at 8:26 AM, pro...@cl... 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 |
|
From: Rob H. <he...@ta...> - 2009-01-28 19:04:07
|
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 |
|
From: João L. S. <js...@fc...> - 2009-01-28 18:20:43
|
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 |
|
From: Mostafa R. <mo...@se...> - 2009-01-28 18:00:15
|
John Hunter wrote: > On Tue, Jan 27, 2009 at 12:44 PM, Mostafa Razavi <mo...@se...> 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? |