[Matplotlib-users] debugging process gets stuck with matpltlib after show()

2010-05-13 Thread Sandy Sandy



Hi all,
I am new born in Python ( 1 week old)

 

Can you pls help to understand the basic concept of
matpltlib interacting with Python

 

the mutter is:

during debugging the  debug processes stacks when fig is created

for example, in code





import matplotlib.pyplot as plt

from pylab import *

x= 23;

y = 11;

print(23456)

plt.plot(range(10))

plot([1,2,3])

show()

print()

a=888



it is impossible after show() to continue debug in any IDE for example Wingwar
or pythonxy 

as stated in

Beginning Python Visualization - Crafting Visual Transformation Scripts (2009)

page  187



Note If you’re not using matplotlib interactively in Python, be sure

to call the function show() after all

graphs have been generated, as it enters a user interface main loop

that will stop execution of the rest of

your code. The reason behind this behavior is that matplotlib is

designed to be embedded in a GUI as well.

In Windows, if you’re working from interactive Python, you need only

issue show() once; close the figures

(or figures) to return to the shell. Subsequent plots will be drawn

automatically without issuing show(), and

you’ll be able to plot graphs interactively.









I tried the code 

 

 

with threads

as suggested in 

http://matplotlib.sourceforge.net/users/shell.html

 

code
taken from people
from wingware

http://www.wingware.com/doc/howtos/matplotlib

 

 

from threading import Timer

t = Timer(0, show)

t.start()



  but still debugging process gets
stuck...


import
matplotlib as mpl

from
pylab import plot,show,close,ion

x
= range(10)

plot(x)

'show()'

from
threading import Timer

t
= Timer(0, show)

t.start()

'ion()
the same result with or not'

a
= 133

y
= [2, 8, 3, 9, 4]

plot(y)

 

zz=
12346

print(4)



Best Regards

Sandy

  
_
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969--

___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Basemap: What is the angular domain for coordinates?

2010-05-13 Thread Reckoner
How do I know if the angular domain for a map is

Longitude \in {0,360}

or

Longitude \in {-180,180}?

Or, for that matter,

Latitude \in {-90,90}

as opposed to:

Latitude \in {0,180}

Thanks!
--

___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Basemap: What is the angular domain for coordinates?

2010-05-13 Thread Jeff Whitaker
On 5/13/10 3:22 PM, Reckoner wrote:
> How do I know if the angular domain for a map is
>
> Longitude \in {0,360}
>
> or
>
> Longitude \in {-180,180}?
>
> Or, for that matter,
>
> Latitude \in {-90,90}
>
> as opposed to:
>
> Latitude \in {0,180}
>
> Thanks!
>
>

You can query the Basemap instance variables lonmin, lonmax, latmin, latmax.

-Jeff


-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : [email protected]
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


--

___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Matplotlib crashes on mouse event

2010-05-13 Thread Fabrice Silva
hi folks,
even on simple script, matplotlib crashes : 
fab:$ python
Python 2.5.5 (r255:77872, Apr 21 2010, 08:44:16) 
[GCC 4.4.3] on linux2 
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
>>> plt.plot([4,2,8])
/usr/lib/pymodules/python2.5/matplotlib/backends/backend_gtk.py:621: 
DeprecationWarning: Use the new widget gtk.Tooltip 
  self.tooltips = gtk.Tooltips()
[]
>>> plt.show()
Instruction non permise

The crash occurs when the mouse enters (if previously outside) and moves
(if previously inside) in the figure.
I am using debian unstable package (0.99.1-1) and admit I have try to
manually modify the gtk backend to resolve the ginput bug (due to
changes in stop_event signature, solved by r8531 but not in debian
package). Since then the crash occurs automatically. Even a complete
remove/purge/install of the package does not solve the problem.

Any idea? Matplotlib's developers? Sandro (Debian maintainer) ?

-- 
Fabrice Silva
LMA UPR CNRS 7051


--

___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Radar chart with multiple scales?

2010-05-13 Thread Uri Laserson
Hi all,

I noticed that the example for the radar chart has only a single scale.  Is
there a way to generate a radar plot where each axis has its own scale?

Thanks!
Uri

-- 
Uri Laserson
Graduate Student, Biomedical Engineering
Harvard-MIT Division of Health Sciences and Technology
M +1 917 742 8019
[email protected]
--

___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users