Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape

2010-03-11 Thread Ian Thomas
Chris Barker wrote:
 ... snip ...

To summarise, you recommend the following units of functionality:

1) Triangulation class to wrap existing delaunay code.
2) Separate the storage of and creation of contour sets so that you
can create your own.
3) tricontour and tricontourf functions to contour a Triangulation.
4) Python utility plotting functions for a Triangulation (triplot,
tripcolor, etc).
5) Simple wrappers for 3 and 4 so you can just pass in the points and
the Triangulation is created for you behind the scenes.

I am happy to make a start with this; no doubt it will take me a
while.  I should point out that I don't intend to tinker with the
delaunay code, so we'll still be left with those pathological cases
that it doesn't work with.  Maybe this can be revisited when I'm done.

Do you want it all in one go, or one unit of functionality at a time
(my preference)?

 Thanks for this, I'm hope I'm not alone in thinking it's really useful stuff.

Let's see!  I'll hold off starting until there have been some votes
for it from other people.

Ian

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] How do I use a grid geometry manager in a matplotlib tk backend

2010-03-11 Thread Kim Hansen
Hi matplotlib list,

I am a resonably experienced python and matplotlib user, when it comes to
make cmd line programs for batch processing, but I have never tried to make
python GUI before.

I am working on a prototype product, where I want the typical matplotlib
plotting window, but extended with controls, such that I can control certain
parameters determining what is being plotted.

I have looked at the embedding_in_tk.py example

http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_tk.html

which uses the pack manager. That example works like a charm for me, and it
seems like i should be able to extend it for my needs

I have also managed to add controls to that using the Tkinter module and
pack(), i.e., the tedious to maintain pack manager

However, I would really like to use a grid geometry manager instead as I
find it much easier to manage. I have therefore tried to modify the example
to use grid instead by moifying the two pack lines in the example

...

#canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)

canvas.get_tk_widget().grid(row=0)

...

#canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)

canvas._tkcanvas.grid(row=1)

...
However, when I try to run that code, I just get an empty form

I have tried other options in the grid method, with no success. I am sure i
must be missing something obvious? Admittedly, these backend things are
close to voodoo for me, so i am just trying to get a prrof of concepts, but
i would not claim that i really undertsnad what is going on.

I have tried to look for useful documentation for doing these kinds of
things, but I have had only limited success. Directions/links to relevant
material would be appreciated as well.

Thanks,

Kim
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] get current line cycle (color cycle), how to

2010-03-11 Thread Pribadi, Krishna
Hello all,
Does anyone know how to get the current line cycle or color cycle for a 
particular line. I'm plotting a collection of lines on 2 axes. After I finish 
plotting on the 1st axis, I then want to plot on the 2nd axis and resume where 
the line color left off in the 1st axis but so far I resets to the first line 
color in the color cycle.

LMK if anyone knows how to set this. I've been digging on the website but don't 
have much luck.

Thanks,

Krishna Adrianto Pribadi
Test Engineer
Desk (TTF): 256.480.4450
Cell: 412.401.1477

Harley-Davidson Motor Co.
Talladega Test Facility
Vehicle Test Stands (VTS)


This communication (including any attachments) is for the use of the intended 
recipient(s) only and may contain information that is confidential, privileged 
or otherwise legally protected. Any unauthorized use or dissemination of this 
communication is prohibited. If you have received this communication in error, 
please immediately notify the sender by return e-mail message and delete all 
copies of the original communication. Thank you for your cooperation


This communication (including any attachments) is for the use of
the intended recipient(s) only and may contain information that is
confidential, privileged or otherwise legally protected. Any
unauthorized use or dissemination of this communication is
prohibited. If you have received this communication in error,
please immediately notify the sender by return e-mail message and
delete all copies of the original communication. Thank you for your
cooperation.--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How do I use a grid geometry manager in a matplotlib tk backend

2010-03-11 Thread Alan G Isaac
On 3/11/2010 8:35 AM, Kim Hansen wrote:
  I would really like to use a grid geometry manager instead

http://effbot.org/tkinterbook/grid.htm

hth,
Alan Isaac


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] get/set current index of color cycle, how to

2010-03-11 Thread KrishnaPribadi

I figured it out, found answer on this site:
http://old.nabble.com/Automatically-changing-line-colors-td893139.html#a949316 
-- 
View this message in context: 
http://old.nabble.com/get-set-current-index-of-color-cycle%2C-how-to-tp27864297p27865867.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Re move, mask, or hide parts of a polygon?

2010-03-11 Thread Jae-Joon Lee
On Tue, Mar 9, 2010 at 4:22 PM, othererik othere...@gmail.com wrote:
 I assumed that my_polygon.set_clip_path( patch ) where patch is a
 patches.Polygon would do the trick.


Please post a complete example that demonstrate your problem. My guess
is that maybe you are not setting the transform of the clipping path
correctly.
Regards,

-JJ

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Can't show grid on subplotzero???

2010-03-11 Thread Jae-Joon Lee
This is a known bug that is fixed in svn (maybe in maint. release too).
The following link gives you a workaround.

http://abitofpythonabitofastronomy.blogspot.com/2009/09/grid-bug-in-axesgrid.html

Depending on your needs, it may better to use spines instead of
axes_grid toolkit.

http://matplotlib.sourceforge.net/examples/pylab_examples/spine_placement_demo.html

Regards,

-JJ


On Wed, Mar 10, 2010 at 10:06 AM, Pribadi, Krishna
krishna.prib...@harley-davidson.com wrote:
 I was running this example, but would like to show the grid. For some
 reason, the plt.grid(“on”) does not work. Any thoughts?

 http://matplotlib.sourceforge.net/examples/axes_grid/simple_axisline2.html



 Thanks,

 Krishna Adrianto Pribadi

 Test Engineer

 Desk (TTF): 256.480.4450

 Cell: 412.401.1477



 Harley-Davidson Motor Co.

 Talladega Test Facility

 Vehicle Test Stands (VTS)



 This communication (including any attachments) is for the use of the
 intended recipient(s) only and may contain information that is confidential,
 privileged or otherwise legally protected. Any unauthorized use or
 dissemination of this communication is prohibited. If you have received this
 communication in error, please immediately notify the sender by return
 e-mail message and delete all copies of the original communication. Thank
 you for your cooperation

 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] turn off tick reflection

2010-03-11 Thread Jae-Joon Lee
On Wed, Mar 10, 2010 at 3:11 PM, Matthew MacLeod
macl...@eefus.colorado.edu wrote:
 I'm trying to make a plot that shares the x axis, but that have two
 different y scales. I can do this, almost, I say almost because I don't
 know how to turn off the reflection of my y ticks, so they are reflected
 and obscure the scale on the other side, if the scales aren't similar.

 I looked at the example
 http://matplotlib.sourceforge.net/plot_directive/mpl_examples/api/two_scales.py



I'm afraid that I'm not sure what the problem is. The two_scales.py
example looks okay to me.
Can you post a screenshot of your result (with some annotation if
possible) so that we can have better idea what is wrong?

Regards,

-JJ

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problem with plotting fast spiking data

2010-03-11 Thread Jakub Nowacki
Just to conclude the problem. I've just installed a fresh svn matplotlib 
(1.0-svn to be exact) and the problem with path optimisation disappeared, 
meaning with path.simplify False plots are correct as far as my data is 
concerned.
BTW it very nicely builds out-of-the-box  on 10.6 in 64-bit mode.

Cheers,

Jakub


On 18 Feb 2010, at 22:37, Eric Firing wrote:

 Jakub Nowacki wrote:
 Hi,
 I work with neural models and I have problem with plotting fast spiking 
 data. The spikes on the plot appear to have different hight which changes 
 when I for example resize the plot window. The same problem is with saving 
 data into files, especially in vector formats. I found the information about 
 changing the join style, it helps a bit (rounded is the best) but doesn't 
 solve the problem. For raster formats the workaround is to save the data in 
 higher resolution, using DPI option. Below I included links to examples.
 
 This sounds like a problem with the path simplification algorithm.  If so, 
 the question is whether it is a bug that has been fixed or a new bug.  What 
 mpl version are you using?  Can you build and install from svn?
 
 Eric
 
 Normal example (100 DPI):
 https://docs.google.com/leaf?id=0B3NZY3443E1VY2JjNTc3MjAtZDI5NC00OThjLTgwY2EtNTVhMDVkZWQ2YzIwhl=en
 Example 300 DPI:
 https://docs.google.com/leaf?id=0B3NZY3443E1VNDdkMzUzNzAtMjdmNC00NjFmLTliMzMtODE5MzExMmNjNjQzhl=en
 The problem is vector files (I'm especially interested in EPS) ignore DPI 
 option. I've experimented with different backends and the problem is 
 persistent on GUI and 'file-writting' back ends. I also tested it on Linux 
 and Mac, and the outcome does't change. Creating larger figures sometimes 
 helps a bit but not always solve the problem. Just to mention that plotting 
 this kind of data is possible 'out of the box'  in Matlab or XPPAut (which 
 is not the most fancy plotting tool) I get a proper outcome. Maybe there 
 should be a option to plot raw data in some sense, or join style function 
 that deals with such a plots in a proper fashion. If you need some 
 additional information do not hesitate to ask. Thanks for the help in 
 advance. Cheers,
 Jakub


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] legend: dash pattern length

2010-03-11 Thread Jae-Joon Lee
Did you try *handlelength*?

http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.legend

Regards,

-JJ


On Wed, Mar 10, 2010 at 4:50 PM, Alan G Isaac ais...@american.edu wrote:
 I need a longer sample of the dash pattern in the legend.
 Possible? (numpoints does not work.)

 Thanks,
 Alan Isaac

 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] get current line cycle (color cycle), how to

2010-03-11 Thread Jae-Joon Lee
Try

ax1 = subplot(121)
ax2 = subplot(122)

ax2._get_lines.color_cycle = ax1._get_lines.color_cycle

ax1.plot([0,1])
ax2.plot([0,1])

Regards,

-JJ


On Thu, Mar 11, 2010 at 9:02 AM, Pribadi, Krishna
krishna.prib...@harley-davidson.com wrote:
 Hello all,

 Does anyone know how to get the current line cycle or color cycle for a
 particular line. I’m plotting a collection of lines on 2 axes. After I
 finish plotting on the 1st axis, I then want to plot on the 2nd axis and
 resume where the line color left off in the 1st axis but so far I resets to
 the first line color in the color cycle.



 LMK if anyone knows how to set this. I’ve been digging on the website but
 don’t have much luck.



 Thanks,



 Krishna Adrianto Pribadi

 Test Engineer

 Desk (TTF): 256.480.4450

 Cell: 412.401.1477



 Harley-Davidson Motor Co.

 Talladega Test Facility

 Vehicle Test Stands (VTS)



 This communication (including any attachments) is for the use of the
 intended recipient(s) only and may contain information that is confidential,
 privileged or otherwise legally protected. Any unauthorized use or
 dissemination of this communication is prohibited. If you have received this
 communication in error, please immediately notify the sender by return
 e-mail message and delete all copies of the original communication. Thank
 you for your cooperation

 This communication (including any attachments) is for the use of the
 intended recipient(s) only and may contain information that is confidential,
 privileged or otherwise legally protected. Any unauthorized use or
 dissemination of this communication is prohibited. If you have received this
 communication in error, please immediately notify the sender by return
 e-mail message and delete all copies of the original communication. Thank
 you for your cooperation

 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape

2010-03-11 Thread Chris Barker
Ian Thomas wrote:
 To summarise, you recommend the following units of functionality:
 
 1) Triangulation class to wrap existing delaunay code.

The idea here is that it would provide a class that holds the result of 
the triangulation. Yes, it would use the existing delaunay code by 
default, and hopefully optionally use the not-as-good-a-license code the 
Robert Kern put in SciPy. In the future, I hope we can find a robust and 
well-licensed code -- I may be able to release some in-house code of 
ours for that some day.

 2) Separate the storage of and creation of contour sets so that you
 can create your own.
 3) tricontour and tricontourf functions to contour a Triangulation.
 4) Python utility plotting functions for a Triangulation (triplot,
 tripcolor, etc).
 5) Simple wrappers for 3 and 4 so you can just pass in the points and
 the Triangulation is created for you behind the scenes.

yup -- that all sounds great!

 I am happy to make a start with this;

wonderful!

 no doubt it will take me a while.  I should point out that I don't intend
  to tinker with the
 delaunay code, so we'll still left with those pathological cases
 that it doesn't work with.  Maybe this can be revisited when I'm done.

hopefully, there still doesn't appear to be a really good delaunay code 
with a flexible license out there -- pity.

 Do you want it all in one go, or one unit of functionality at a time
 (my preference)?

I don't see any reason to add it piecemeal, as long as the pieces are 
useful by themselves.

 Let's see!  I'll hold off starting until there have been some votes
 for it from other people.

hmm -- I wonder if a post to matplotlib-devel is in order. Most of those 
folks are on this list, to, but may not be following this thread.

By the way, it sounds like your contouring code is in C++ -- is that 
important? I don't expect it should be that computationally expensive, 
though maybe hard to vectorize -- C++ does make portability harder, 
though there's a bunch in MPL already.  If I was starting from scratch, 
I'd use Cython, if pure Python didn't cut it.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape

2010-03-11 Thread Robert Kern
On 2010-03-11 13:38 PM, Chris Barker wrote:
 Ian Thomas wrote:
 To summarise, you recommend the following units of functionality:

 1) Triangulation class to wrap existing delaunay code.

 The idea here is that it would provide a class that holds the result of
 the triangulation. Yes, it would use the existing delaunay code by
 default, and hopefully optionally use the not-as-good-a-license code the
 Robert Kern put in SciPy.

I did what now?

-- 
Robert Kern

I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth.
   -- Umberto Eco


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] 1d weighted histogram with log y-axis not colored correctly

2010-03-11 Thread Craig the Demolishor
Hi folks,
  Lately I've been working with some data that is too copious to fit in
memory, so I've had to write a wrapper for pyplot.hist that bins the data in
chunks and then draws it like so:

  pyplot.hist(x_edges, bins=100, weights=bin_contents,
histtype='stepfilled', facecolor='g')

  However, when I try to set the histogram's y-scale to logarithmic the
colors get all messed up (see attached). Any ideas? This is w/ matplotlib
0.99.0.


Thanks in advance.

--cb

# Example script
import numpy as
np
import matplotlib.pyplot as
plt


# generate some data on
log-scale
x =
10**np.random.uniform(size=1)

# bin the data myself
bins, xed = np.histogram(x, bins=100, range=(0,
10))

# plot the data as a weighted histo


plt.hist(np.linspace(0, 10, 100), bins=100, weights=bins,
histtype='stepfilled',
facecolor='g')

plt.yscale('log')

plt.savefig(test.png)

plt.clf()
attachment: test.png--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 1d weighted histogram with log y-axis not colored correctly

2010-03-11 Thread Gökhan Sever
On Thu, Mar 11, 2010 at 2:41 PM, Craig the Demolishor destrooo...@gmail.com
 wrote:

 Hi folks,
   Lately I've been working with some data that is too copious to fit in
 memory, so I've had to write a wrapper for pyplot.hist that bins the data in
 chunks and then draws it like so:

   pyplot.hist(x_edges, bins=100, weights=bin_contents,
 histtype='stepfilled', facecolor='g')

   However, when I try to set the histogram's y-scale to logarithmic the
 colors get all messed up (see attached). Any ideas? This is w/ matplotlib
 0.99.0.


 Thanks in advance.

 --cb

 # Example script
 import numpy as
 np
 import matplotlib.pyplot as
 plt


 # generate some data on
 log-scale
 x =
 10**np.random.uniform(size=1)

 # bin the data myself
 bins, xed = np.histogram(x, bins=100, range=(0,
 10))

 # plot the data as a weighted histo


 plt.hist(np.linspace(0, 10, 100), bins=100, weights=bins,
 histtype='stepfilled',
 facecolor='g')

 plt.yscale('log')

 plt.savefig(test.png)

 plt.clf()



Use log=True in the plt.hist instead of explicitly setting the in the
yscale()





 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users




-- 
Gökhan
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] figure save problem

2010-03-11 Thread Andre Walker-Loud
Hi All,

I am having a problem saving figures produced with matplotlib.  Right  
now, I am running a freshly built

matplotlib-0.99.1.2 (unzipped, the directory reads 0.99.1.1?) built on
python-2.6
numpy-1.3.0
scipy-0.7.1
ipython-0.10


All on an OSX 10.5 intel.

When I try to save a figure, in the Save the figure dialogue box,  
the Save As: window does not recognize any keyboard entries.  If I  
copy and paste, that works (at first).  But I remembered reading about  
this problem people were having with Snow Leopard.

Originally, copy/pasting worked to workaround this problem, but I  
find that after trying a few other things, I can no longer even paste  
anything into the Save As: Box.  Further, when I click the Save or  
Cancel buttons, they flash like normal, however the dialogue box  
does not go away, the file is not saved, and I can't escape!   
Ahh!  I can still navigate through my folders with the mouse in  
the dialogue box, but clearly something is not right.


Last week, I had Python 2.5, matplotlib 0.98.6 and everything worked  
just fine.

I have the problem whether running through python or ipython.asdfasdf


Any ideas how to fix this?


Thanks,

Andre

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How do I use a grid geometry manager in a matplotlib tk backend

2010-03-11 Thread Friedrich Romstedt
2010/3/11 Kim Hansen slaun...@gmail.com:
 canvas.get_tk_widget().grid(row=0)
 canvas._tkcanvas.grid(row=1)

I cannot reproduce your problem.  Can you maybe provide a
self-contained script to reproduce the behaviour?  Here is mine:

 import Tkinter
 import matplotlib
 tk = Tkinter.Tk()
 import matplotlib.figure
 fig = matplotlib.figure.Figure()
 fig.set_size_inches((3, 3))
 import matplotlib.backends.backend_tkagg
 canvas = matplotlib.backends.backend_tkagg.FigureCanvasTkAgg(fig, master = 
 tk)
 canvas.show()
 canvas.get_tk_widget().grid(row = 0, column = 0)  # or .grid(row = 0)

 tk.columnconfigure(0, weight = 1)
 tk.rowconfigure(0, weight = 1)
 canvas.get_tk_widget().grid_forget()
 canvas.get_tk_widget().grid(row = 0, column = 0, sticky = Tkinter.NSEW)

Btw, do you know some nice way to change the xy data of a plot?  At
the moment, I'm always clearing the figure and drawing again.

I also don't like the black frame around the figure, with my
self-coded backend using similar code as backend_tkagg.py, I don't
observe such a black frame.

Friedrich

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] IRC for matplotlib

2010-03-11 Thread afancy
Hi,

Could anybody know if there is IRC for matplotlib? as I cannot find it.
Thanks


Regards,
afancy
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape

2010-03-11 Thread Chris Barker
Robert Kern wrote:
 the triangulation. Yes, it would use the existing delaunay code by
 default, and hopefully optionally use the not-as-good-a-license code the
 Robert Kern put in SciPy.
 
 I did what now?

I thought you'd put a wrapper of a delaunay code that is GPL'd or 
something (not BSD compatible anyway) into a scikit or something? 
optional -- so it doesn't screw up licensing for those that don't want it.

Anyway, the point is, for any code that might be put into MPL, we want a 
properly licensed compatible default, but ideally with the option of 
easily plug in in other, better, delaunay code that may not be license 
compatible.

Now that I've written this, I really should go and look and see if I 
remember correctly:

I've found this:

http://scikits.appspot.com/delaunay

Though I see no reference to license in there, so I presume it's under 
the same license as scipy.

So I guess I was thinking of the natgrid toolkit, which I guess is not 
Robert's work, and is a substitute for nn interpolation, not triangulation.

Sorry for writing too quickly.

While I've got your attention, though -- I suspect you have looked for 
license compatible delaunay code and the stuff in the scikits package is 
as good as it gets?

Thanks,
   -Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] figure save problem

2010-03-11 Thread James Boyle
I have the same problem with nearly identical setup:
OS X 10.5.8 - intel
matplotlib 99.1.1
python 2.6.1
ipython 0.9.1
numpy-1.3.0

--Jim


On Mar 11, 2010, at 1:31 PM, Andre Walker-Loud wrote:

 Hi All,

 I am having a problem saving figures produced with matplotlib.  Right
 now, I am running a freshly built

 matplotlib-0.99.1.2 (unzipped, the directory reads 0.99.1.1?) built on
 python-2.6
 numpy-1.3.0
 scipy-0.7.1
 ipython-0.10


 All on an OSX 10.5 intel.

 When I try to save a figure, in the Save the figure dialogue box,
 the Save As: window does not recognize any keyboard entries.  If I
 copy and paste, that works (at first).  But I remembered reading about
 this problem people were having with Snow Leopard.

 Originally, copy/pasting worked to workaround this problem, but I
 find that after trying a few other things, I can no longer even paste
 anything into the Save As: Box.  Further, when I click the Save or
 Cancel buttons, they flash like normal, however the dialogue box
 does not go away, the file is not saved, and I can't escape!
 Ahh!  I can still navigate through my folders with the mouse in
 the dialogue box, but clearly something is not right.


 Last week, I had Python 2.5, matplotlib 0.98.6 and everything worked
 just fine.

 I have the problem whether running through python or ipython.asdfasdf


 Any ideas how to fix this?


 Thanks,

 Andre

 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://*p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://*lists.sourceforge.net/lists/listinfo/matplotlib-users



--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape

2010-03-11 Thread Robert Kern
On 2010-03-11 15:49 PM, Chris Barker wrote:
 Robert Kern wrote:
 the triangulation. Yes, it would use the existing delaunay code by
 default, and hopefully optionally use the not-as-good-a-license code the
 Robert Kern put in SciPy.

 I did what now?

 I thought you'd put a wrapper of a delaunay code that is GPL'd or
 something (not BSD compatible anyway) into a scikit or something?
 optional -- so it doesn't screw up licensing for those that don't want it.

 Anyway, the point is, for any code that might be put into MPL, we want a
 properly licensed compatible default, but ideally with the option of
 easily plug in in other, better, delaunay code that may not be license
 compatible.

 Now that I've written this, I really should go and look and see if I
 remember correctly:

 I've found this:

 http://scikits.appspot.com/delaunay

 Though I see no reference to license in there, so I presume it's under
 the same license as scipy.

 So I guess I was thinking of the natgrid toolkit, which I guess is not
 Robert's work, and is a substitute for nn interpolation, not triangulation.

 Sorry for writing too quickly.

Instead of addressing the misconceptions point by point, let me just lay out 
the 
situation:

natgrid is a GPLed library for doing Delaunay triangulation and natural 
neighbor 
interpolation. The author is presumed to be deceased, so this code will always 
be GPLed. It seems to fail less often when doing the Delaunay triangulation on 
datasets in the wild; however, it is not using robust geometric primitives, so 
there probably still are cases where it fails.

I wrote a BSD library for doing natural neighbor interpolation using the 
Delaunay triangulation code using the sweepline algorithm. This algorithm does 
not (and cannot) use robust geometric primitives, so there are datasets for 
which it fails to produce a valid triangulation. This is the code in 
scikits.delaunay. I have not pushed it to a 1.0 release because of this issue. 
However, this *was* put into matplotlib. matplotlib can optionally use natgrid 
if it is installed.

 While I've got your attention, though -- I suspect you have looked for
 license compatible delaunay code and the stuff in the scikits package is
 as good as it gets?

Pretty much. I do have some code for constructing the Delaunay triangulation 
using robust primitives and an insertion algorithm, but it is an order of 
magnitude slower than scikits.delaunay. Ideally, we would be able to find or 
write a divide-and-conquer algorithm using Jon Shewchuk's robust geometric 
primitives.

-- 
Robert Kern

I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth.
   -- Umberto Eco


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Yet another Tk backend

2010-03-11 Thread Friedrich Romstedt
Hello,

I just uploaded just another Tk backend for matplotlib.  It can
connect to any Figure instance, also with multiple Axes (although only
one will be active for interactive zooming and panning).

I hope the package is useful because of its special mouse usage.

To pan, click right, hold, and pan.
To zoom, click left, hold, and pan.
To auto-zoom, click double-left.
To open a window for adjusting title, xy labels, limits, and also for
saving the figure to hdd, click double-right.

I attach an screenshot of the settings dialog to attract some attention ...

You can download from
github.com/friedrichromstedt/matplotlib_backend_fr .  Please find also
the README there and the screenshot is also placed under Downloads.

If anyone would like the package _and_ would have some wxPython
knowledge or other widget packages, I would appreciate code for
porting it to that widget platform.  Currently only Tk is supported.
But the framework is such that other widgets can reuse some parts of
the implementation.

Friedrich
attachment: Example.png--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] contourf doesn't like a rectangular grid

2010-03-11 Thread Friedrich Romstedt
I deem it useful if you would add a

print map_XX.shape, map_YY.shape, y.shape  .

I'm suspicious about their shape.  _check_xyz() accepts 2D X,Y-arrays
only if their shape is equal to that of y (y in your case).

Friedrich

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Fixing Figure Size

2010-03-11 Thread Friedrich Romstedt
I would suggest that you add the axes with:

axes = figure.add_axes((left, bottom, width, height))

instead of .add_subplot().  I think you have too many subplots, it
seems that the algorithm isn't designed for this.  With .add_axes(),
you can add more space.

Note that you have then maybe to call the axes.plot() method directly,
which may be an disadvantage or advantage, depending on you mood :-)

hth,
Friedrich

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] legend: dash pattern length

2010-03-11 Thread Alan G Isaac
On 3/11/2010 1:44 PM, Jae-Joon Lee wrote:
 Did you try*handlelength*?
 http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.legend


OK, now I know what handlelength means.

1. What are the units (and why not points)?
2. Can this be set on a legend object (after creation)?
(There does not appear to be a setter on the legend;
do I have to get the handles and set each?)

Thanks,
Alan



--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] IRC for matplotlib

2010-03-11 Thread Ryan May
On Thu, Mar 11, 2010 at 3:14 PM, afancy grou...@gmail.com wrote:
 Hi,

 Could anybody know if there is IRC for matplotlib? as I cannot find it.
 Thanks

#scipy is an appropriate for all things numpy, matplotlib, scipy, etc.

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] legend: dash pattern length

2010-03-11 Thread Jae-Joon Lee
On Thu, Mar 11, 2010 at 8:32 PM, Alan G Isaac ais...@american.edu wrote:
 1. What are the units (and why not points)?

Fraction of (legend) font size (in points). It was decided that it is
these dimensions are better to be scale with font size.
For example, handlelength=5 means 50 points when legend font size is 10 points.

 2. Can this be set on a legend object (after creation)?
 (There does not appear to be a setter on the legend;
 do I have to get the handles and set each?)


Right now, public setter method is not supported for these attributes.
While this is possible it is a bit tricky. I need to double-check but
you need to change the dimension of not only the associated artist
(e.g., lines) but also its container (offsetbox).
The current design recommends you to create a new legend (by calling
legend again) if you want to change its attribute.
If this approach is not applicable, please describe your use case.

Regards,

-JJ


As of now, some (maybe most) of legend attributes are not exposed is
possible but a bit tricky to do

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users