[Matplotlib-users] xticks and yticks on central axis

2008-07-19 Thread Bryan Fodness
I would like the xticks and yticks on the central axis to look like the
attached png.  Right now, I am just using axvline and axhline.


-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
attachment: gradicule.png-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Rotating an axes instance

2008-06-19 Thread Bryan Fodness
I have an axes instance that I would like to rotate.  I see that there is a
rotation keyword for text and would like to do something like that with a
plot.  Is this possible.

-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo

Any intelligent fool can make things bigger, more complex, and more
violent. It takes a touch of genius - and a lot of courage - to move in the
opposite direction.  -Albert Einstein
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Rotating an axes instance

2008-06-18 Thread Bryan Fodness
I have an axes instance that I would like to rotate.  I see that there is a
rotation keyword for text and would like to do something like that with a
plot.
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Posting to Numpy and Scipy

2008-06-17 Thread Bryan Fodness
Has anyone had a problem posting to either of these mailing lists.  I am a
member and have sent a few posts to each of them over the last couple
months, but none of them show up in the list.  I always receive a 'awaiting
moderator approval' email.  I have sent an email to the owner about this,
but have not received a response.
Bryan
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] missing lines on graph with upgrade to 0.98.0

2008-06-09 Thread Bryan Fodness
I have copied the new patches.py and axes.py.  It fixed the fill, but I
still have an axes instance that is not closed.

x1, x2, y1, y2 = -4, 4, -4, 4
ax1 = axes([0.0, 0.0, 1.0, 1.0], axisbg='0.95')
ax2 = axes([0.2, 0.1, 0.6, 0.8], axisbg='w')
ax2.fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')
xlim(x1-2,x2+2)
ylim(y1-2,y2+2)

Do I need more than the files that I have copied?
On Thu, Jun 5, 2008 at 4:19 PM, Eric Firing [EMAIL PROTECTED] wrote:

 Bryan,

 Thanks for pointing this out.  Mike D. has made a change in the svn trunk
 to restore the automatic closing of polygons made with the patches.Polygon
 constructor, which is used by the fill command.

 Eric

 Bryan Fodness wrote:

 It seems like it does not connect the last point to the first point.  This
 also happens with the matplotlib.patches Polygon.
   from pylab import fill, xlim, ylim, savefig
 x1, x2, y1, y2 = -4, 4, -4, 4
 fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')
 xlim(-5,5)
 ylim(-5,5)
 savefig('edge_test')


 On Thu, Jun 5, 2008 at 1:18 AM, Eric Firing [EMAIL PROTECTED] mailto:
 [EMAIL PROTECTED] wrote:

Bryan Fodness wrote:

I just upgraded to 0.98.0 and recreated a few graphs.  I am
missing parts of the edges of a fill and polygon.  Any suggestions?


Please post an illustrative script, as simple as possible.

Eric




 --
 The game of science can accurately be described as a never-ending insult
 to human intelligence. - João Magueijo





-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] missing lines on graph with upgrade to 0.98.0

2008-06-05 Thread Bryan Fodness
It seems like it does not connect the last point to the first point.  This
also happens with the matplotlib.patches Polygon.


from pylab import fill, xlim, ylim, savefig
x1, x2, y1, y2 = -4, 4, -4, 4
fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')
xlim(-5,5)
ylim(-5,5)
savefig('edge_test')


On Thu, Jun 5, 2008 at 1:18 AM, Eric Firing [EMAIL PROTECTED] wrote:

 Bryan Fodness wrote:

 I just upgraded to 0.98.0 and recreated a few graphs.  I am missing parts
 of the edges of a fill and polygon.  Any suggestions?


 Please post an illustrative script, as simple as possible.

 Eric




-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] fill function

2008-06-05 Thread Bryan Fodness
Is there a way to get the underlying array that the fill function uses to
graph a polygon?

This is assuming that it uses an array.  I would like to be able to multiple
an array by an array that describes the polygon (one if inside the polygon
and zero if outside)



-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] missing lines on graph with upgrade to 0.98.0

2008-06-04 Thread Bryan Fodness
I just upgraded to 0.98.0 and recreated a few graphs.  I am missing parts of
the edges of a fill and polygon.  Any suggestions?

-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
attachment: Benchmark3-out.png-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] using facecolor='None' for fill on Windows and Fedora

2008-05-16 Thread Bryan Fodness
I have updated to matplotlib 0.92.1 and numpy 1.0.4 and still receive
an error.
/space/work/Bryan$ ./Check_0.1.py
Traceback (most recent call last):
  File ./Check_0.1.py, line 344, in module
savefig(outfile)
  File /usr/lib/python2.5/site-packages/matplotlib/pylab.py, line 796, in
savefig
return fig.savefig(*args, **kwargs)
  File /usr/lib/python2.5/site-packages/matplotlib/figure.py, line 727, in
savefig
self.canvas.print_figure(*args, **kwargs)
  File
/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py, line
456, in print_figure
self.draw()
  File
/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py, line
392, in draw
self.figure.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/figure.py, line 569, in
draw
for a in self.axes: a.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/axes.py, line 1155, in
draw
a.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/patches.py, line 209,
in draw
else: rgbFace = colorConverter.to_rgb(self._facecolor)
  File /usr/lib/python2.5/site-packages/matplotlib/colors.py, line 429, in
to_rgb
raise ValueError('to_rgb: Invalid rgb arg %s\n%s' % (str(arg), exc))
ValueError: to_rgb: Invalid rgb arg None
invalid literal for float(): None
Does anyone have an idea?  It works in Windows.

On Fri, May 9, 2008 at 5:18 PM, Eric Firing [EMAIL PROTECTED] wrote:

 Bryan Fodness wrote:

 i have used this command on windows vista with no problem.

 fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')

 but when i run on fedora 8, i receive the following.

 [...]

 File /usr/lib/python2.5/site-packages/matplotlib/colors.py, line
 429, in tob
   raise ValueError('to_rgb: Invalid rgb arg %s\n%s' % (str(arg),
 exc))
   ValueError: to_rgb: Invalid rgb arg None
   invalid literal for float(): None
 could someone tell me if i am missing something?



 Sounds like you have an older mpl version on the Fedora machine than on the
 Win box.

 Eric




-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] using facecolor='None' for fill on Windows and Fedora

2008-05-16 Thread Bryan Fodness
i didn't have 0.92.1, i have 0.91.2

[bryan@ ~]$ python
Python 2.5.2 (r252:60911, May 13 2008, 22:14:05)
[GCC 4.1.2 20070502 (Red Hat 4.1.2-12)] on linux2
Type help, copyright, credits or license for more information.
 import matplotlib
 matplotlib.__version__
'0.91.2'
 import numpy
 numpy.__version__
'1.0.4'


[bryan@ ~]$ locate pylab.py
/usr/lib/python2.5/site-packages/pylab.py
/usr/lib/python2.5/site-packages/pylab.pyc
/usr/lib/python2.5/site-packages/pylab.pyo
/usr/lib/python2.5/site-packages/matplotlib/pylab.py
/usr/lib/python2.5/site-packages/matplotlib/pylab.pyc
/usr/lib/python2.5/site-packages/matplotlib/pylab.pyo
/usr/local/lib/python2.5/site-packages/pylab.py
/usr/local/lib/python2.5/site-packages/pylab.pyc
/usr/local/lib/python2.5/site-packages/matplotlib/pylab.py
/usr/local/lib/python2.5/site-packages/matplotlib/pylab.pyc
[EMAIL PROTECTED]

On Fri, May 16, 2008 at 1:35 PM, Eric Firing [EMAIL PROTECTED] wrote:

 Bryan,

 It appears that you are not using the mpl version you think you are. When I
 look at colors.py for 0.92.1, it doesn't match your error message.

 What do you get when you do, from a python prompt:

 import matplotlib
 print matplotlib.__version__

 You might try using locate pylab.py to find out where the various
 versions are.

 Eric

 Bryan Fodness wrote:

 I have updated to matplotlib 0.92.1 and numpy 1.0.4 and still receive an
 error.
 /space/work/Bryan$ ./Check_0.1.py http://check_0.1.py/ 
 http://Check_0.1.py http://check_0.1.py/
 Traceback (most recent call last):
  File ./Check_0.1.py http://check_0.1.py/ 
 http://Check_0.1.pyhttp://check_0.1.py/,
 line 344, in module
savefig(outfile)
  File /usr/lib/python2.5/site-packages/matplotlib/pylab.py, line 796, in
 savefig
return fig.savefig(*args, **kwargs)
  File /usr/lib/python2.5/site-packages/matplotlib/figure.py, line 727,
 in savefig
self.canvas.print_figure(*args, **kwargs)
  File
 /usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py, line
 456, in print_figure
self.draw()
  File
 /usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py, line
 392, in draw
self.figure.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/figure.py, line 569,
 in draw
for a in self.axes: a.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/axes.py, line 1155, in
 draw
a.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/patches.py, line 209,
 in draw
else: rgbFace = colorConverter.to_rgb(self._facecolor)
  File /usr/lib/python2.5/site-packages/matplotlib/colors.py, line 429,
 in to_rgb
raise ValueError('to_rgb: Invalid rgb arg %s\n%s' % (str(arg), exc))
 ValueError: to_rgb: Invalid rgb arg None
 invalid literal for float(): None
 Does anyone have an idea?  It works in Windows.
  On Fri, May 9, 2008 at 5:18 PM, Eric Firing [EMAIL PROTECTED] mailto:
 [EMAIL PROTECTED] wrote:

Bryan Fodness wrote:

i have used this command on windows vista with no problem.

fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')

but when i run on fedora 8, i receive the following.

[...]

File
/usr/lib/python2.5/site-packages/matplotlib/colors.py, line
429, in tob
  raise ValueError('to_rgb: Invalid rgb arg %s\n%s' %
(str(arg), exc))
  ValueError: to_rgb: Invalid rgb arg None
  invalid literal for float(): None
could someone tell me if i am missing something?


Sounds like you have an older mpl version on the Fedora machine than
on the Win box.

Eric




 --
 The game of science can accurately be described as a never-ending insult
 to human intelligence. - João Magueijo





-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] using facecolor='None' for fill on Windows and Fedora

2008-05-16 Thread Bryan Fodness
Thanks for your help!

I was forcing it to look in an old location with,

 #!/usr/bin/python

as my first line.



On Fri, May 16, 2008 at 1:44 PM, Bryan Fodness [EMAIL PROTECTED]
wrote:

 i didn't have 0.92.1, i have 0.91.2

 [bryan@ ~]$ python
 Python 2.5.2 (r252:60911, May 13 2008, 22:14:05)
 [GCC 4.1.2 20070502 (Red Hat 4.1.2-12)] on linux2
 Type help, copyright, credits or license for more information.
  import matplotlib
  matplotlib.__version__
 '0.91.2'
  import numpy
  numpy.__version__
 '1.0.4'
 

 [bryan@ ~]$ locate pylab.py
 /usr/lib/python2.5/site-packages/pylab.py
 /usr/lib/python2.5/site-packages/pylab.pyc
 /usr/lib/python2.5/site-packages/pylab.pyo
 /usr/lib/python2.5/site-packages/matplotlib/pylab.py
 /usr/lib/python2.5/site-packages/matplotlib/pylab.pyc
 /usr/lib/python2.5/site-packages/matplotlib/pylab.pyo
 /usr/local/lib/python2.5/site-packages/pylab.py
 /usr/local/lib/python2.5/site-packages/pylab.pyc
 /usr/local/lib/python2.5/site-packages/matplotlib/pylab.py
 /usr/local/lib/python2.5/site-packages/matplotlib/pylab.pyc
 [EMAIL PROTECTED]

 On Fri, May 16, 2008 at 1:35 PM, Eric Firing [EMAIL PROTECTED] wrote:

 Bryan,

 It appears that you are not using the mpl version you think you are. When
 I look at colors.py for 0.92.1, it doesn't match your error message.

 What do you get when you do, from a python prompt:

 import matplotlib
 print matplotlib.__version__

 You might try using locate pylab.py to find out where the various
 versions are.

 Eric

 Bryan Fodness wrote:

 I have updated to matplotlib 0.92.1 and numpy 1.0.4 and still receive an
 error.
 /space/work/Bryan$ ./Check_0.1.py http://check_0.1.py/ 
 http://Check_0.1.py http://check_0.1.py/
 Traceback (most recent call last):
  File ./Check_0.1.py http://check_0.1.py/ 
 http://Check_0.1.pyhttp://check_0.1.py/,
 line 344, in module
savefig(outfile)
  File /usr/lib/python2.5/site-packages/matplotlib/pylab.py, line 796,
 in savefig
return fig.savefig(*args, **kwargs)
  File /usr/lib/python2.5/site-packages/matplotlib/figure.py, line 727,
 in savefig
self.canvas.print_figure(*args, **kwargs)
  File
 /usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py, line
 456, in print_figure
self.draw()
  File
 /usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py, line
 392, in draw
self.figure.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/figure.py, line 569,
 in draw
for a in self.axes: a.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/axes.py, line 1155,
 in draw
a.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/patches.py, line 209,
 in draw
else: rgbFace = colorConverter.to_rgb(self._facecolor)
  File /usr/lib/python2.5/site-packages/matplotlib/colors.py, line 429,
 in to_rgb
raise ValueError('to_rgb: Invalid rgb arg %s\n%s' % (str(arg), exc))
 ValueError: to_rgb: Invalid rgb arg None
 invalid literal for float(): None
 Does anyone have an idea?  It works in Windows.
  On Fri, May 9, 2008 at 5:18 PM, Eric Firing [EMAIL PROTECTED]mailto:
 [EMAIL PROTECTED] wrote:

Bryan Fodness wrote:

i have used this command on windows vista with no problem.

fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')

but when i run on fedora 8, i receive the following.

[...]

File
/usr/lib/python2.5/site-packages/matplotlib/colors.py, line
429, in tob
  raise ValueError('to_rgb: Invalid rgb arg %s\n%s' %
(str(arg), exc))
  ValueError: to_rgb: Invalid rgb arg None
  invalid literal for float(): None
could someone tell me if i am missing something?


Sounds like you have an older mpl version on the Fedora machine than
on the Win box.

Eric




 --
 The game of science can accurately be described as a never-ending insult
 to human intelligence. - João Magueijo





 --
 The game of science can accurately be described as a never-ending insult
 to human intelligence. - João Magueijo




-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] using fill, but really need a box

2008-05-09 Thread Bryan Fodness
i have been using the fill function to highlight a region on my plot, but
now i do not want it to be filled.  i have tried using alpha=0.1, but that
also makes my edgecolor transparent.  is there a box function that does
not fill a region yet still has the outline of the box.  i tried using
patch.rectangle, but it was not what i needed.

-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] using facecolor='None' for fill on Windows and Fedora

2008-05-09 Thread Bryan Fodness
i have used this command on windows vista with no problem.

 fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')

but when i run on fedora 8, i receive the following.
   (most recent call last):
 File ./program.py, line 361, in module
   savefig(outfile)
 File /usr/lib/python2.5/site-packages/matplotlib/pylab.py, line 796,
in savg
   return fig.savefig(*args, **kwargs)
 File /usr/lib/python2.5/site-packages/matplotlib/figure.py, line 727,
in sag
   self.canvas.print_figure(*args, **kwargs)
 File
/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py, le
   self.draw()
 File
/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py, lw
   self.figure.draw(renderer)
 File /usr/lib/python2.5/site-packages/matplotlib/figure.py, line 569,
in drw
   for a in self.axes: a.draw(renderer)
 File /usr/lib/python2.5/site-packages/matplotlib/axes.py, line 1155,
in draw
   a.draw(renderer)
 File /usr/lib/python2.5/site-packages/matplotlib/patches.py, line
209, in dw
   else: rgbFace = colorConverter.to_rgb(self._facecolor)
 File /usr/lib/python2.5/site-packages/matplotlib/colors.py, line 429,
in tob
   raise ValueError('to_rgb: Invalid rgb arg %s\n%s' % (str(arg),
exc))
   ValueError: to_rgb: Invalid rgb arg None
   invalid literal for float(): None
could someone tell me if i am missing something?


-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Rotating an axes

2008-05-08 Thread Bryan Fodness
Can someone tell me if there is a way to rotate an axes instance?

I have,

 figure(1)
 ax1 = axes([0.0, 0.0, 1.0, 1.0], axisbg='0.95')
 ax2 = axes([0.2, 0.1, 0.6, 0.8], axisbg='white')

and I would like to rotate ax2 30 degrees.  It would look something like the
attached file.



-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
attachment: rotate.png-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Drawing shapes outside the plot area

2008-05-06 Thread Bryan Fodness
I would like to be able to draw a triangle on the graph outside the axes and
plot area.  I have used fill before, but that was in the plot area.  Can
someone push me in the right direction?

-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Fwd: speed of clearing and creating a new array

2008-04-08 Thread Bryan Fodness
I am starting with a zero array, populate it according to some
condition, save the graph, and then reset the array to zero.  Can
someone tell me if there is a better (faster) way to do this?  Or am I
just doing that much, and that is how long it will take?  I have a
couple hundred graphs that I am creating, that will ultimately be
combined for animation.

ay=4000
ax=60
#create empty array
a = zeros((ay,ax), int)

while something:
  pcolormesh(X, Y, a)
  figname = 'Frame%03d' %int(field)
  print figname
  savefig(figname)
  # reset values
  a = zeros((ay,ax), int)
  if something:
 if something:
 a[y,x] = a[y,x]+1
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Rotating data in graph

2008-01-18 Thread Bryan Fodness
Is there an easy way to rotate the view of the data in a graph window
without changing the axis and titles.  I only need the option for 90, 180,
and 270 degrees.  The window will always be symmetric.

Bryan

-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] plotting a pcolormesh and fill

2007-12-23 Thread Bryan Fodness
I have a pcolormest and a fill that are plotted on the same graph (they have
the same scale).  Is there an easy way
to only plot the values of pcolormesh that lie in the fill?

pcolormesh(oX, oY, test, shading='flat', cmap=cm.gray_r)
fill([-x1,x2,x2,-x1], [-y1,-y1,y2,y2], 'b', alpha=0.2, edgecolor='r')


-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] plotting a pcolormesh and a fill

2007-12-21 Thread Bryan Fodness
I have a pcolormest and a fill that are plotted on the same graph (they have
the same scale).  Is there an easy way
to only plot the values of pcolormesh that lie in the fill?

pcolormesh(oX, oY, test, shading='flat', cmap=cm.gray_r)
fill([-x1,x2,x2,-x1], [-y1,-y1,y2,y2], 'b', alpha=0.2, edgecolor='r')


-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] drawing a box

2007-12-18 Thread Bryan Fodness
I would like to draw a polygon using a x1, x2, y1, and y2.

I tried to use axhline and axvline with the min and max values but it does
give the desired result.  It changes the axis limits and does not draw a
line at all.

Any help would be appreciated.
Bryan

-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] drawing a box

2007-12-18 Thread Bryan Fodness
I do want a rectangle.  And, I have tried,

axvline(x=x1, ymin=y1, ymax=y2)
axvline(x=x2, ymin=y1, ymax=y2)
axhline(y=y1, xmin=x1, xmax=x2)
axhline(y=y2, xmin=x1, xmax=x2)

On Dec 18, 2007 10:40 PM, John Hunter [EMAIL PROTECTED] wrote:

 On Dec 18, 2007 9:00 PM, Bryan Fodness [EMAIL PROTECTED] wrote:
  I would like to draw a polygon using a x1, x2, y1, and y2.

 At a minimum, x1, x2, y1, and y2 define a line segment, or at most a
 rectangle.  You say a polygon.  What exactly do you mean, and what
 have you tried (code please)?

 JDH




-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] viewing my data correctly

2007-12-14 Thread Bryan Fodness
I would also like to get the area of the mesh element when I fill the
corresponding array element.

if a[1,0]
area = 1.0 * 0.01

if a[30,0]
area = 0.5 * 0.01

Is this possible?
On Nov 26, 2007 7:02 PM, Eric Firing [EMAIL PROTECTED] wrote:

 Bryan Fodness wrote:
  Could someone give me an idea how to get started with this so it
  coincides with my array of values.  I took a look at the quadmesh_demo
  in the examples and do not see a straightforward way to do this

 Maybe the docstrings make it sound more complicated than it really is.
  In your case you have an array of rectangles, not general
 quadrilaterals.  All you need are two 1-D arrays, one each for the x and
 y grid boundaries.  Something like this:

 Z = numpy.random.rand(60,4000)
 X = numpy.arange(4001)
 Y = numpy.array([0, 1.4] + [1.0]*9 + [0.5]*40 + [1]*9 + [1.4]).cumsum()
 pcolor(X, Y, Z)

 pcolormesh should work the same, but when I try it now with svn it
 doesn't; I don't know what is going on with it.  If you are using a
 release version of mpl, I expect it will work.

 Eric

 
  On Nov 26, 2007 7:52 AM, Michael Droettboom [EMAIL PROTECTED] wrote:
  You can provide mesh coordinates to the pcolor command:
 
  X and Y, if given, specify the (x,y) coordinates of the colored
  quadrilaterals; the quadrilateral for C[i,j] has corners at
  (X[i,j],Y[i,j]), (X[i,j+1],Y[i,j+1]), (X[i+1,j],Y[i+1,j]),
  (X[i+1,j+1],Y[i+1,j+1]).  Ideally the dimensions of X and Y
  should be one greater than those of C; if the dimensions are the
  same, then the last row and column of C will be ignored.
 
  Actually generating the mesh is up to you (wink), but hopefully that
  allows for what you need to do.
 
  Cheers,
  Mike
 
 
  Bryan Fodness wrote:
  I am wondering if there is a way to view my data with respect to the
  physical size of what my array element is suppose to be.
 
  I have an array that is 60 x 4000 where,
  the first row has a height of 1.4
  the next nine has a height of 1
  the next forty has a height of 0.5
  the next nine has a height of 1
  and the last one has a height of 1.4
 
  When viewing this with contourf or pcolor, the image is more narrow
  than it should be.  Is there an easy way to view this properly.
 
  Bryan
 
  --
  Michael Droettboom
  Science Software Branch
  Operations and Engineering Division
  Space Telescope Science Institute
  Operated by AURA for NASA
 
 
 
 




-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] viewing my data correctly

2007-12-14 Thread Bryan Fodness
Thanks, this is what I wanted.  I overlooked the cumsum() on the end of my
array, so the output of the array was not what I expected or needed.

Could you help me figure out how to get an axis label and numbers on
the right side of my graph.  It is the same data and scale as the left side
except it will read Leaf B.

On Dec 14, 2007 9:09 PM, Eric Firing [EMAIL PROTECTED] wrote:

 Bryan Fodness wrote:
  I would also like to get the area of the mesh element when I fill the
  corresponding array element.
 
  if a[1,0]
  area = 1.0 * 0.01
 
  if a[30,0]
  area = 0.5 * 0.01
 
  Is this possible?

 I'm sorry, but I don't understand what you are asking.  Are you asking
 how to calculate an array of areas corresponding to the grid?  You know
 what the delta-Y values are:

 dy = numpy.array([1.4] + [1.0]*9 + [0.5]*40 + [1]*9 + [1.4])

 Are you looking for

 area = dy * 0.01

 ?

 Eric

  On Nov 26, 2007 7:02 PM, Eric Firing [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
  Bryan Fodness wrote:
Could someone give me an idea how to get started with this so it
coincides with my array of values.  I took a look at the
  quadmesh_demo
in the examples and do not see a straightforward way to do this
 
  Maybe the docstrings make it sound more complicated than it really
 is.
   In your case you have an array of rectangles, not general
  quadrilaterals.  All you need are two 1-D arrays, one each for the x
  and
  y grid boundaries.  Something like this:
 
  Z = numpy.random.rand(60,4000)
  X = numpy.arange(4001)
  Y = numpy.array([0, 1.4] + [1.0]*9 + [0.5]*40 + [1]*9 + [1.4
 ]).cumsum()
  pcolor(X, Y, Z)
 
  pcolormesh should work the same, but when I try it now with svn it
  doesn't; I don't know what is going on with it.  If you are using a
  release version of mpl, I expect it will work.
 
  Eric
 
   
On Nov 26, 2007 7:52 AM, Michael Droettboom [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] wrote:
You can provide mesh coordinates to the pcolor command:
   
X and Y, if given, specify the (x,y) coordinates of the
 colored
quadrilaterals; the quadrilateral for C[i,j] has corners at
(X[i,j],Y[i,j]), (X[i,j+1],Y[i,j+1]), (X[i+1,j],Y[i+1,j]),
(X[i+1,j+1],Y[i+1,j+1]).  Ideally the dimensions of X and Y
should be one greater than those of C; if the dimensions are
 the
same, then the last row and column of C will be ignored.
   
Actually generating the mesh is up to you (wink), but hopefully
 that
allows for what you need to do.
   
Cheers,
Mike
   
   
Bryan Fodness wrote:
I am wondering if there is a way to view my data with respect
  to the
physical size of what my array element is suppose to be.
   
I have an array that is 60 x 4000 where,
the first row has a height of 1.4
the next nine has a height of 1
the next forty has a height of 0.5
the next nine has a height of 1
and the last one has a height of 1.4
   
When viewing this with contourf or pcolor, the image is more
 narrow
than it should be.  Is there an easy way to view this properly.
   
Bryan
   
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
   
   
   
   
 
 
 
 
  --
  The game of science can accurately be described as a never-ending
  insult to human intelligence. - João Magueijo




-- 
The game of science can accurately be described as a never-ending insult to
human intelligence. - João Magueijo
attachment: Figure.png-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] colorbar and secondary axis label

2007-11-26 Thread Bryan Fodness
I would like to have my colorbar range from 0 to 1 and add a label
(Leaf A) exactly like the Leaf B label on the other side of the
y-axis.

I have attached my .png

--
from pylab import *

#pcolor(n, shading='flat', cmap=cm.gray_r)
contourf(n, cmap=cm.gray_r)

title('Intensity Pattern', size=28)
xlabel('Distance (0.01 cm)', size=18)
ylabel('Leaf B', size=18)
axvline(x=ax/2, color='k', linestyle='--')
colorbar()
savefig('eIntensity')
--

Thank you,
Bryan

-- 
The game of science can accurately be described as a never-ending
insult to human intelligence.  - João Magueijo

-- 
The game of science can accurately be described as a never-ending
insult to human intelligence.  - João Magueijo

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] viewing my data correctly

2007-11-26 Thread Bryan Fodness
Could someone give me an idea how to get started with this so it
coincides with my array of values.  I took a look at the quadmesh_demo
in the examples and do not see a straightforward way to do this

On Nov 26, 2007 7:52 AM, Michael Droettboom [EMAIL PROTECTED] wrote:
 You can provide mesh coordinates to the pcolor command:

 X and Y, if given, specify the (x,y) coordinates of the colored
 quadrilaterals; the quadrilateral for C[i,j] has corners at
 (X[i,j],Y[i,j]), (X[i,j+1],Y[i,j+1]), (X[i+1,j],Y[i+1,j]),
 (X[i+1,j+1],Y[i+1,j+1]).  Ideally the dimensions of X and Y
 should be one greater than those of C; if the dimensions are the
 same, then the last row and column of C will be ignored.

 Actually generating the mesh is up to you (wink), but hopefully that
 allows for what you need to do.

 Cheers,
 Mike


 Bryan Fodness wrote:
  I am wondering if there is a way to view my data with respect to the
  physical size of what my array element is suppose to be.
 
  I have an array that is 60 x 4000 where,
  the first row has a height of 1.4
  the next nine has a height of 1
  the next forty has a height of 0.5
  the next nine has a height of 1
  and the last one has a height of 1.4
 
  When viewing this with contourf or pcolor, the image is more narrow
  than it should be.  Is there an easy way to view this properly.
 
  Bryan
 

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




-- 
The game of science can accurately be described as a never-ending
insult to human intelligence.  - João Magueijo

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] viewing my data correctly

2007-11-25 Thread Bryan Fodness
I am wondering if there is a way to view my data with respect to the
physical size of what my array element is suppose to be.

I have an array that is 60 x 4000 where,
the first row has a height of 1.4
the next nine has a height of 1
the next forty has a height of 0.5
the next nine has a height of 1
and the last one has a height of 1.4

When viewing this with contourf or pcolor, the image is more narrow
than it should be.  Is there an easy way to view this properly.

Bryan

-- 
The game of science can accurately be described as a never-ending
insult to human intelligence.  - João Magueijo

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] secondary axis same as primary with different label

2007-11-20 Thread Bryan Fodness
I would like to have a secondary y-axis that has the same scale, but a
different label.  Also, I would like to draw a dashed line down the
center of the plot.

I have used,

ax1 = pcolor(a, shading='flat', cmap=cm.gray_r)
title('Intensity Pattern')
xlabel('Distance')
ylabel('Leaf B')

ax2=twinx()
ylabel('Leaf A')
ax2.yaxis.tick_right()

colorbar()

and the scale is different for the second y-axis as well as prints on
top of the colorbar.

-Bryan

The game of science can accurately be described as a never-ending
insult to human intelligence.  - João Magueijo

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users