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
(5) |
2
(17) |
3
(13) |
4
(17) |
5
(26) |
6
(13) |
7
(9) |
|
8
(8) |
9
(13) |
10
(25) |
11
(19) |
12
(24) |
13
(12) |
14
|
|
15
|
16
(5) |
17
(10) |
18
(7) |
19
|
20
(7) |
21
(2) |
|
22
(3) |
23
(11) |
24
(19) |
25
(17) |
26
(6) |
27
(10) |
28
(2) |
|
29
(4) |
30
(15) |
|
|
|
|
|
|
From: Fernando P. <fpe...@gm...> - 2007-04-05 20:47:31
|
On 4/5/07, Eric Firing <ef...@ha...> wrote: > Grant Edwards wrote: > > I've just started using matplotlib, and I'm stumped on where to > > find basic info. I've search the users guide, tutorial, and > > FAQ, and I can't find things as simple as a list of what the > > color specifiers are. I've figured out that 'r' is red, 'k' is > > black, but I can't figure out where stuff like that is > > documented. > > > > Likewise for line-style. > > > > Where is the basic usage info at? http://www.scipy.org/wikis/topical_software/Tutorial Highly useful. Ignore the numarray/astronomy language; it's being updated for numpy, and it contains precisely all those really handy tables you're asking for. Regards, f |
|
From: Grant E. <gr...@vi...> - 2007-04-05 20:29:26
|
On 2007-04-05, C M <cmp...@gm...> wrote:
> I've had some luck using Google also to find such things, either official
> documentation or a posting about it on a group or such. E.g., searching the
> terms "matplotlib" and "colors", gave as the first hit:
Thanks. I searched for various combinations, but my mistake
seems to have been using "color" instead of "colors".
> But where are these pages generally? They're under the Class Library link
> under documentation. If you look through the classes there maybe that will
> help?
Yup. Between that and docstrings (as somebody else pointed out),
that should do it.
--
Grant Edwards grante Yow! .. I see TOILET
at SEATS...
visi.com
|
|
From: C M <cmp...@gm...> - 2007-04-05 20:25:21
|
[I also forgot to forward this to the list] Grant, I've had some luck using Google also to find such things, either official documentation or a posting about it on a group or such. E.g., searching the terms "matplotlib" and "colors", gave as the first hit: http://matplotlib.sourceforge.net/matplotlib.colors.html And that should help on colors. For example, you can put: plot(x,y, 'go',markersize=9') for green (g=green) circles (o=circle). Or you could put it as plot(x,y, '>', color='chartreuse', markersize=9) for chartreuse triangles (>) facing to the right. The options for different types of markers is found here http://matplotlib.sourceforge.net/matplotlib.pylab.html (Search the page for "the marker can be one of" you'll see some choices below it.) ...as well as under the table for "Line Properties" in the Tutorial. Unfortunately some of the useful links on that Tutorial page, like to "plot" and "color", appear to be broken. But where are these pages generally? They're under the Class Library link under documentation. If you look through the classes there maybe that will help? There's probably a better way to know this stuff. Anybody have recommendations? Good luck, Che On 4/5/07, Grant Edwards < gr...@vi...> wrote: > > I've just started using matplotlib, and I'm stumped on where to > find basic info. I've search the users guide, tutorial, and > FAQ, and I can't find things as simple as a list of what the > color specifiers are. I've figured out that 'r' is red, 'k' is > black, but I can't figure out where stuff like that is > documented. > > Likewise for line-style. > > Where is the basic usage info at? > > -- > Grant Edwards grante Yow! If I pull this > SWITCH > at I'll be RITA HAYWORTH!! > Or > visi.com a SCIENTOLOGIST! > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Ken M. <mc...@ii...> - 2007-04-05 20:21:35
|
I forgot to CC the list on my reply. Perhaps the colors and styles deserve to have a table in the tutorial? Ken On Apr 5, 2007, at 2:57 PM, Ken McIvor wrote: > On Apr 5, 2007, at 2:42 PM, Grant Edwards wrote: >> >> I've just started using matplotlib, and I'm stumped on where to >> find basic info. I've search the users guide, tutorial, and >> FAQ, and I can't find things as simple as a list of what the >> color specifiers are. I've figured out that 'r' is red, 'k' is >> black, but I can't figure out where stuff like that is >> documented. >> >> Likewise for line-style. >> >> Where is the basic usage info at? > > It's hiding in plain sight. Go to http://matplotlib.sf.net and > scroll down. There will be a table of pylab commands, organized > alphabetically. Click the "plot" link. Viola! > > Ken |
|
From: Ken M. <mc...@ii...> - 2007-04-05 20:20:57
|
On Apr 5, 2007, at 2:14 PM, belinda thom wrote: > > I do think its valuable to be able to write a blocking mouse > function. After your pointer to Timer (which led me to the threading > Python library) and idle handler (which I didn't find useful doc on, > so didn't persue), I came up with the code I'll append below. My > printing of time elapsed seems to imply the thing is working as I'd > expect (I see times that differ by about 1 second). Problem is, I > still get the twirling wheel of deadness on my Mac that led me to > post my original message. You will probably always have this problem when you do things that prevent the GUI's event loop from running. Are you running your code from within iPython or as a script? > And then I got Chris's great reply, which makes me wonder if I'm > trying to do too much. I'd have to agree with Chris that you are trying to do too much from within pylab. > I've been using pyrorobotics, which relies heavily on Tk, but their > plotting facilities are not great. So I started using matplotlib and > really like it. And I ran into problems w/their Tk interface where > windows wouldn't update correctly on the mouse unless the mouse was > clicked in the window. Found some stuff via google implying this was > some nasty bug on Mac, didn't find an easy work around, so now try to > use matplotlib whenever possible, which explains my current path to > trying to use it to provide a simple graphic interface to a python > Connect 4 game that I wrote so my students can have fun writing > "smart" game players in my AI course. If that's what you're aiming for you'd probably be happier with the result if you write something using Tkinter's Canvas or the wxPython FloatCanvas. > In Matlab, I'm used to building applications, so I was hoping it > would be possible to do something similar in matplotlib. Well, it's entirely possible to build applications that use matplotlib. The thing to remember is that matplotlib isn't its own programming language or development environment -- it ties Python and and bunch of libraries together to provide a Matlab-like interface in the 'pylab' module. > Perhaps matplotlib is not currently set up for such things (in > which case I'd > like to ask if this is something you'd like to include in the future). Although I'm matplotlib is going to continue becoming more powerful and flexible, I'd personally be surprised if that ever becomes one of the project's goals. I obviously can't speak for anyone else, but it seems to me that people who want to build GUI applications using matplotlib should be doing so by using matplotlib from within Python. I also suspect that the engineering effort involved in making this functionality happen might be beyond the scope of the project. Ken |
|
From: Joshua J. K. <jo...@ee...> - 2007-04-05 20:17:30
|
Installing an egg today, I got this message from easy_install: /usr/bin/easy_install:5: UserWarning: Module dateutil was already imported from /usr/lib/python2.4/site-packages/matplotlib-0.87.7-py2.4-linux-i686.egg/dateutil/__init__.pyc, but /usr/lib/python2.4/site-packages/python_dateutil-1.1-py2.4.egg is being added to sys.path from pkg_resources import load_entry_point Investigating, it seems that Matplotlib includes python-dateutils wholesale in its egg, instead of depending on the python-dateutils egg and installing that, thus generating warning messages like these. Would be possible to remove the dateutil module from future matplotlib eggs and simply rely on the python-dateutils egg? Thanks! j -- Joshua Kugler Lead System Admin -- Senior Programmer http://www.eeinternet.com PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111 |
|
From: Eric F. <ef...@ha...> - 2007-04-05 19:58:46
|
Grant Edwards wrote: > I've just started using matplotlib, and I'm stumped on where to > find basic info. I've search the users guide, tutorial, and > FAQ, and I can't find things as simple as a list of what the > color specifiers are. I've figured out that 'r' is red, 'k' is > black, but I can't figure out where stuff like that is > documented. > > Likewise for line-style. > > Where is the basic usage info at? > There is quite a bit of information in docstrings. If you use ipython -pylab (highly recommended), then try: plot? From a standard python shell, the equivalent is import pylab help(pylab.plot) Eric |
|
From: Grant E. <gr...@vi...> - 2007-04-05 19:45:15
|
I've just started using matplotlib, and I'm stumped on where to
find basic info. I've search the users guide, tutorial, and
FAQ, and I can't find things as simple as a list of what the
color specifiers are. I've figured out that 'r' is red, 'k' is
black, but I can't figure out where stuff like that is
documented.
Likewise for line-style.
Where is the basic usage info at?
--
Grant Edwards grante Yow! If I pull this SWITCH
at I'll be RITA HAYWORTH!! Or
visi.com a SCIENTOLOGIST!
|
|
From: belinda t. <bt...@cs...> - 2007-04-05 19:14:50
|
On Apr 5, 2007, at 6:27 AM, John Hunter wrote:
> On 4/5/07, belinda thom <bt...@cs...> wrote:
>
>> My app needs to look something like this:
>>
>> ------
>>
>> create a game and display it in a matplotlib figure
>>
>> while game not over :
>>
>> if its player 1's turn, get player 1's valid mouse input,
>> otherwise get player 2's
>>
>
> You need to get out of the mold of thinking about while loops with
> blocking input. Instead make everything event driven and track state
> variables to decide which player's mouse events to process. So
> instead of getting a blocking input, simply do nothing on events
> unless you are in a certain state. You can use a timer or an idle
> handler for recurring processing rather than a while loop.
This was the kind of advice I was looking for. Being so new to
Python, I hadn't a clue what to look for.
I do think its valuable to be able to write a blocking mouse
function. After your pointer to Timer (which led me to the threading
Python library) and idle handler (which I didn't find useful doc on,
so didn't persue), I came up with the code I'll append below. My
printing of time elapsed seems to imply the thing is working as I'd
expect (I see times that differ by about 1 second). Problem is, I
still get the twirling wheel of deadness on my Mac that led me to
post my original message.
And then I got Chris's great reply, which makes me wonder if I'm
trying to do too much.
I've been using pyrorobotics, which relies heavily on Tk, but their
plotting facilities are not great. So I started using matplotlib and
really like it. And I ran into problems w/their Tk interface where
windows wouldn't update correctly on the mouse unless the mouse was
clicked in the window. Found some stuff via google implying this was
some nasty bug on Mac, didn't find an easy work around, so now try to
use matplotlib whenever possible, which explains my current path to
trying to use it to provide a simple graphic interface to a python
Connect 4 game that I wrote so my students can have fun writing
"smart" game players in my AI course.
In Matlab, I'm used to building applications, so I was hoping it
would be possible to do something similar in matplotlib. Perhaps
matplotlib is not currently set up for such things (in which case I'd
like to ask if this is something you'd like to include in the future).
Thanks again,
--b
class Mouse :
def __init__(self,f,cb) :
self.data = None
self.cb = cb
def getClick(event) :
self.data = event.xdata
self.cb()
f.canvas.mpl_connect("button_press_event",getClick)
def blockMouse(f,rng) :
import threading
import time
startTime = time.time()
e = threading.Event()
def cb() :
e.set()
m = Mouse(f,cb)
def valid(val,rng) :
print "time elapsed is %g" % (time.time()-startTime)
if val == None :
return False
for i in rng :
if i-.4 <= val <= i+.4 :
return True
return False
# poll til valid
while True :
e.wait(1)
if valid(m.data,rng) :
break
else:
e.clear()
m.data = None
return m.data
def app() :
import pylab
pylab.close('all')
f = pylab.figure()
rng = [1,2,3]
pylab.plot([1,2,3],[1,2,3])
pylab.axis([0,4,0,4])
while True :
mouse = blockMouse(f, rng)
if mouse == 2 :
break
else :
print mouse
|
|
From: Timothy <te...@xm...> - 2007-04-05 16:36:35
|
Hope this isn't a sore subject, but are there ways with Matplotlib to generate dendrograms? Thanks, Tim |
|
From: Fernando P. <fpe...@gm...> - 2007-04-05 16:10:40
|
Hi all, sorry to spam the list a bit, but what follows is of direct interest to a good number of matplotlib users. Yesterday we put out here: http://ipython.scipy.org/dist/testing/ a release candidate for IPython 0.7.4, as well as PyReadline (needed by windows users). There is one new feature in this release which is of particular interest to matplotlib users: the ability to hit Ctrl-C to interrupt a long-running script or computation, even when using any of the multithreaded backends for matplotlib (WX, GTK or QT-based). Doing this requires ctypes (part of python 2.5 but not automatically in 2.4), and I had to use an undocumented feature of the Python C API, so this is a bit of a 'black hack'. On the other hand, it is *extremely* useful to be able to stop something you didn't want to run for long without having to completely kill your ipython session. Since I'm not 100% sure this will really work without any glitches, I'd greatly appreciate the testing from any willing participants here. If this feature survives real-world beating, we'll release next week. If the feature remains, I'm likely to change the official version number to 0.8 to indicate a new series with asynchronous exception support in multiple threads. thanks, f |
|
From: Christopher B. <Chr...@no...> - 2007-04-05 16:05:51
|
Belinda, While I'm sure you can find a way to do what you want with MPL, it sounds like you're really pushing the bounds of what it's designed for. Having been a Matlab user myself, I can see how you've gotten here, but I think you should consider other options. Matplotlib is a plotting library -- it's not a gui development lib. I'd think about using a tool designed for the job. I don't know what you want the graphics of your game to look like, but depending on that, some suggestions: PyGame -- good for fancy raster graphics, not so good if you have a need for other GUI elements -- all the typical controls, text boxes etc. TkInter -- it has a Canvas people like a lot that gives a lot of flexibility. wxPython -- The wxPython FloatCanvas (full disclosure -- it's my baby) could probably help you out a lot here, if you're dealing with vector graphics, and particularly if you want zooming and panning. I'm sure you could do it with pyGTK or pyQT also. Deciding between all these options is hard, they all have their strengths. What's best for you is a function of what the needs of your app are, what your future needs may be, what platforms you need to support, and taste. Even if MPL is a perfect fit for your graphics, if you get beyond a basic "calculate and plot" app, you'll probably want to use MPL embedded in a GUI toolkit, TK, GTK or wx. -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: Adrian D. <ad...@be...> - 2007-04-05 14:04:17
|
Hello, Thanks very much to everyone who helped me with this issue. I found my LaTeX path by doing echo $PATH in a terminal window, and then adding this line to the x11 path in my bashrc file, PATH=/usr/local/teTeX/bin/powerpc-apple-darwin-current:$PATH; export PATH My plots (labels included) look fine now. Thanks again, Adrian |
|
From: John H. <jd...@gm...> - 2007-04-05 13:27:46
|
On 4/5/07, belinda thom <bt...@cs...> wrote: > My app needs to look something like this: > > ------ > > create a game and display it in a matplotlib figure > > while game not over : > > if its player 1's turn, get player 1's valid mouse input, > otherwise get player 2's > You need to get out of the mold of thinking about while loops with blocking input. Instead make everything event driven and track state variables to decide which player's mouse events to process. So instead of getting a blocking input, simply do nothing on events unless you are in a certain state. You can use a timer or an idle handler for recurring processing rather than a while loop. JDH |
|
From: Adrian D. <ad...@be...> - 2007-04-05 13:26:06
|
Hi Brian,
I wouldn't doubt that this is a path issue. The other path issues
that I've had installing python and then the requisite libraries seems
to be endless. I'm using Mac OSX.4, a Powerbook but not an
Intel-based Mac (as far as I know... its several years old).
My ~/.profile is actually empty. A while ago, I left a note in this
file that all of the terminals are controlled by the /etc/bashrc file.
I tried sourcing this file, but to no avail.
It appears that I need to add LaTeX, dvipng, and ghostscript to my
path. I installed LaTeX and ghostscript using iInstaller and run TeX
through a front end (AlphaX) that does all of the typesetting for me,
so I'm woefully ignorant of the paths for any of these utilities. I
installed dvipng very recently, so I assume it went to the default
location. I have two questions:
1) How do I determine the paths of these utilities?
and
2) How do I add them to the PATH variable? Should I put this in a
configuration file somewhere so that I don't have to do this
repeatedly?
Thanks for the quick responses, and sorry about the ignorant questions,
Adrian
On 4/5/07, Brian Donovan <do...@mi...> wrote:
> Adrian,
>
> This may be a path issue. I have found that xterm or gnome-
> terminal are not started as login shells and therefor the .profile
> file (for bash) is not read. This caused my path to be incorrect. You
> can run 'source ~/.profile' when you start to get the paths setup
> correctly. You can also edit the X11 xinitrc to get xterm to start as
> a login shell.
>
> Brian
>
> On Apr 5, 2007, at 9:01 AM, Adrian Down wrote:
>
> > Hello,
> >
> > I am getting an error when I try to use any TeX formatting in plot
> > labels. There is an example below. I don't know if its relevant, but
> > I can only use the "latex" command in my OSX terminal. If I try
> > "latex sample.tex" in an x11 window, x11 claims no knowledge of latex.
> >
> > I have had to install two libraries and hunt down my kpathsea library,
> > and this still isn't working. Is there any easier way to achieve text
> > and math together in a label, such as "Text $\pi$" ? Thanks,
> >
> > Adrian
> >
> > In [1]: matplotlib.rc('text', usetex=True)
> >
> > In [2]: plot(arange(3), arange(3));xlabel('Text')
> > sh: line 1: latex: command not found
> > ----------------------------------------------------------------------
> > -----
> > exceptions.RuntimeError Traceback (most
> > recent call last)
> >
> > /Users/adrian/Documents/Academic/Courses/Research/Cosmo/Code/
> > <ipython console>
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/pylab.py
> > in plot(*args, **kwargs)
> > 3089 try:
> > 3090 ret = gca().plot(*args, **kwargs)
> > -> 3091 draw_if_interactive()
> > 3092 except:
> > 3093 hold(b)
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/IPython/genutils.py
> > in wrapper(*args, **kw)
> > 742 def wrapper(*args,**kw):
> > 743 wrapper.called = False
> > --> 744 out = func(*args,**kw)
> > 745 wrapper.called = True
> > 746 return out
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/backends/backend_tkagg.py
> > in draw_if_interactive()
> > 57 figManager = Gcf.get_active()
> > 58 if figManager is not None:
> > ---> 59 figManager.show()
> > 60
> > 61
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/backends/backend_tkagg.py
> > in show(self)
> > 303 if sys.platform=='win32' : self.window.update()
> > 304 else:
> > --> 305 self.canvas.draw()
> > 306 self._shown = True
> > 307
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/backends/backend_tkagg.py
> > in draw(self)
> > 152
> > 153 def draw(self):
> > --> 154 FigureCanvasAgg.draw(self)
> > 155 tkagg.blit(self._tkphoto, self.renderer._renderer,
> > colormode=2)
> > 156 self._master.update_idletasks()
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/backends/backend_agg.py
> > in draw(self)
> > 390
> > 391 renderer = self.get_renderer()
> > --> 392 self.figure.draw(renderer)
> > 393
> > 394 def get_renderer(self):
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/figure.py
> > in draw(self, renderer)
> > 542
> > 543 # render the axes
> > --> 544 for a in self.axes: a.draw(renderer)
> > 545
> > 546 # render the figure text
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/axes.py
> > in draw(self, renderer, inframe)
> > 1070
> > 1071 for zorder, i, a in dsu:
> > -> 1072 a.draw(renderer)
> > 1073
> > 1074 self.transData.thaw() # release the lazy objects
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/axis.py
> > in draw(self, renderer, *args, **kwargs)
> > 559 tick.set_label1(label)
> > 560 tick.set_label2(label)
> > --> 561 tick.draw(renderer)
> > 562 if tick.label1On and tick.label1.get_visible():
> > 563 extent = tick.label1.get_window_extent
> > (renderer)
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/axis.py
> > in draw(self, renderer)
> > 159 if self.tick2On: self.tick2line.draw(renderer)
> > 160
> > --> 161 if self.label1On: self.label1.draw(renderer)
> > 162 if self.label2On: self.label2.draw(renderer)
> > 163
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/text.py
> > in draw(self, renderer)
> > 836 def draw(self, renderer):
> > 837 self.update_coords(renderer)
> > --> 838 Text.draw(self, renderer)
> > 839 if self.get_dashlength() > 0.0:
> > 840 self.dashline.draw(renderer)
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/text.py
> > in draw(self, renderer)
> > 338
> > 339 return
> > --> 340 bbox, info = self._get_layout(renderer)
> > 341
> > 342 if ismath=='TeX':
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/text.py
> > in _get_layout(self, renderer)
> > 185 heightt += 3 # 3 pixel pad
> > 186 for line in lines:
> > --> 187 w,h = renderer.get_text_width_height(
> > 188 line, self._fontproperties,
> > ismath=self.is_math_text())
> > 189
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/backends/backend_agg.py
> > in get_text_width_height(self, s, prop, ismath, rgb)
> > 238 size = prop.get_size_in_points()
> > 239 texmanager = self.get_texmanager()
> > --> 240 Z = texmanager.get_rgba(s, size, self.dpi.get
> > (), rgb)
> > 241 m,n,tmp = Z.shape
> > 242 return n,m
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/texmanager.py
> > in get_rgba(self, tex, fontsize, dpi, rgb)
> > 327 if Z is None:
> > 328 # force=True to skip cacheing while debugging
> > --> 329 pngfile = self.make_png(tex, fontsize, dpi,
> > force=False)
> > 330 X = readpng(os.path.join(self.texcache, pngfile))
> > 331
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/texmanager.py
> > in make_png(self, tex, fontsize, dpi, force)
> > 242 # see get_rgba for a discussion of the background
> > 243 if force or not os.path.exists(pngfile):
> > --> 244 dvifile = self.make_dvi(tex, fontsize)
> > 245 outfile = basefile+'.output'
> > 246 command = self.get_shell_cmd('cd "%s"' %
> > self.texcache,
> >
> > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> > site-packages/matplotlib/texmanager.py
> > in make_dvi(self, tex, fontsize, force)
> > 223 fh = file(outfile)
> > 224 if exit_status:
> > --> 225 raise RuntimeError('LaTeX was not able to
> > process the flowing \
> > 226 string:\n%s\nHere is the full report generated by LaTeX:
> > \n\n'% tex + fh.read())
> > 227 else: verbose.report(fh.read(), 'debug')
> >
> > RuntimeError: LaTeX was not able to process the flowing string:
> > $0.0$
> > Here is the full report generated by LaTeX:
> >
> > ----------------------------------------------------------------------
> > ---
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
> > share your
> > opinions on IT & business topics through brief surveys-and earn cash
> > http://www.techsay.com/default.php?
> > page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
> Brian Donovan
> --
> Research Assistant
> CASA ERC
> Microwave Remote Sensing Lab
> do...@mi...
>
>
>
>
|
|
From: Darren D. <dd...@co...> - 2007-04-05 13:17:31
|
Hi Adrian, On Thursday 05 April 2007 09:01:55 am Adrian Down wrote: > I am getting an error when I try to use any TeX formatting in plot > labels. There is an example below. I don't know if its relevant, but > I can only use the "latex" command in my OSX terminal. If I try > "latex sample.tex" in an x11 window, x11 claims no knowledge of latex. See http://www.scipy.org/Cookbook/Matplotlib/UsingTex. You need to make sure that latex, ghostscript and dvipng are all on your PATH. > I have had to install two libraries and hunt down my kpathsea library, > and this still isn't working. Is there any easier way to achieve text > and math together in a label, such as "Text $\pi$" ? Thanks, Usetex is currently the only way to render text that mixes regular text with mathtext. Also note, you should use raw strings: r"Text $\pi$", not "Text $\pi$" Darren |
|
From: Adrian D. <ad...@be...> - 2007-04-05 13:01:59
|
Hello,
I am getting an error when I try to use any TeX formatting in plot
labels. There is an example below. I don't know if its relevant, but
I can only use the "latex" command in my OSX terminal. If I try
"latex sample.tex" in an x11 window, x11 claims no knowledge of latex.
I have had to install two libraries and hunt down my kpathsea library,
and this still isn't working. Is there any easier way to achieve text
and math together in a label, such as "Text $\pi$" ? Thanks,
Adrian
In [1]: matplotlib.rc('text', usetex=True)
In [2]: plot(arange(3), arange(3));xlabel('Text')
sh: line 1: latex: command not found
---------------------------------------------------------------------------
exceptions.RuntimeError Traceback (most
recent call last)
/Users/adrian/Documents/Academic/Courses/Research/Cosmo/Code/<ipython console>
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py
in plot(*args, **kwargs)
3089 try:
3090 ret = gca().plot(*args, **kwargs)
-> 3091 draw_if_interactive()
3092 except:
3093 hold(b)
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/IPython/genutils.py
in wrapper(*args, **kw)
742 def wrapper(*args,**kw):
743 wrapper.called = False
--> 744 out = func(*args,**kw)
745 wrapper.called = True
746 return out
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py
in draw_if_interactive()
57 figManager = Gcf.get_active()
58 if figManager is not None:
---> 59 figManager.show()
60
61
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py
in show(self)
303 if sys.platform=='win32' : self.window.update()
304 else:
--> 305 self.canvas.draw()
306 self._shown = True
307
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py
in draw(self)
152
153 def draw(self):
--> 154 FigureCanvasAgg.draw(self)
155 tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
156 self._master.update_idletasks()
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py
in draw(self)
390
391 renderer = self.get_renderer()
--> 392 self.figure.draw(renderer)
393
394 def get_renderer(self):
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/figure.py
in draw(self, renderer)
542
543 # render the axes
--> 544 for a in self.axes: a.draw(renderer)
545
546 # render the figure text
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py
in draw(self, renderer, inframe)
1070
1071 for zorder, i, a in dsu:
-> 1072 a.draw(renderer)
1073
1074 self.transData.thaw() # release the lazy objects
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py
in draw(self, renderer, *args, **kwargs)
559 tick.set_label1(label)
560 tick.set_label2(label)
--> 561 tick.draw(renderer)
562 if tick.label1On and tick.label1.get_visible():
563 extent = tick.label1.get_window_extent(renderer)
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py
in draw(self, renderer)
159 if self.tick2On: self.tick2line.draw(renderer)
160
--> 161 if self.label1On: self.label1.draw(renderer)
162 if self.label2On: self.label2.draw(renderer)
163
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/text.py
in draw(self, renderer)
836 def draw(self, renderer):
837 self.update_coords(renderer)
--> 838 Text.draw(self, renderer)
839 if self.get_dashlength() > 0.0:
840 self.dashline.draw(renderer)
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/text.py
in draw(self, renderer)
338
339 return
--> 340 bbox, info = self._get_layout(renderer)
341
342 if ismath=='TeX':
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/text.py
in _get_layout(self, renderer)
185 heightt += 3 # 3 pixel pad
186 for line in lines:
--> 187 w,h = renderer.get_text_width_height(
188 line, self._fontproperties, ismath=self.is_math_text())
189
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py
in get_text_width_height(self, s, prop, ismath, rgb)
238 size = prop.get_size_in_points()
239 texmanager = self.get_texmanager()
--> 240 Z = texmanager.get_rgba(s, size, self.dpi.get(), rgb)
241 m,n,tmp = Z.shape
242 return n,m
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/texmanager.py
in get_rgba(self, tex, fontsize, dpi, rgb)
327 if Z is None:
328 # force=True to skip cacheing while debugging
--> 329 pngfile = self.make_png(tex, fontsize, dpi, force=False)
330 X = readpng(os.path.join(self.texcache, pngfile))
331
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/texmanager.py
in make_png(self, tex, fontsize, dpi, force)
242 # see get_rgba for a discussion of the background
243 if force or not os.path.exists(pngfile):
--> 244 dvifile = self.make_dvi(tex, fontsize)
245 outfile = basefile+'.output'
246 command = self.get_shell_cmd('cd "%s"' % self.texcache,
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/texmanager.py
in make_dvi(self, tex, fontsize, force)
223 fh = file(outfile)
224 if exit_status:
--> 225 raise RuntimeError('LaTeX was not able to
process the flowing \
226 string:\n%s\nHere is the full report generated by LaTeX:
\n\n'% tex + fh.read())
227 else: verbose.report(fh.read(), 'debug')
RuntimeError: LaTeX was not able to process the flowing string:
$0.0$
Here is the full report generated by LaTeX:
|
|
From: Mark B. <ma...@gm...> - 2007-04-05 08:03:26
|
> > On Wed, 4 Apr 2007, John Hunter apparently wrote: > > If anyone has any comments or objections to this plan, speak now. I only switched a couple of months ago (basically because I was waiting for numpy 1.0 and for scipy to switch) and numpy is so much nicer! (Not that I didn't like Numeric; I couldn't have started without them!). Starting the numpy jettison for MPL may encourage others to make the move. They have to move eventually anyway. And I think they will be very happy in the end. +1 for me, Mark |
|
From: belinda t. <bt...@cs...> - 2007-04-05 07:42:45
|
Hi Angus and the Matplotlib community,
I'm finally getting around to trying your suggestions, which at first
blush seem like they'd do what I want, so THANKS for that!
But I'm still running into issues for which I'm uncertain how to
proceed. I outline my stumbling blocks below, which have to do with
what I'd like my app to do. No doubt my understanding of writing GUI-
style code in Python/matplotlib is lacking, but it seems my app needs
more structure than the typical usage of mouse clicks in matplotlib.
I outline my thinking below.
On Mar 23, 2007, at 6:11 PM, Angus McMorland wrote:
> ---------------------------
> from pylab import figure
>
> class gui :
> def __init__(self, callback) :
> self.f = figure()
> self.ax = self.f.add_subplot(111)
> self.ax.plot([1,2,3])
> self.data = None # valid mouse click hasn't yet happened
> def clicker(event):
> self.data = event.xdata
> if 1 <= self.data <= 3:
> callback(self.data)
> self.f.canvas.mpl_connect("button_press_event",clicker)
> print "Waiting for valid mouse click..."
>
> ----------------------------
> then in your application (or shell):
>
> def my_cb(inp):
> # processing here
> print inp
>
> g = gui(my_cb)
>
> No polling required, and you only get the valid clicks calling your
> routine. I hope that helps,
My app needs to look something like this:
------
create a game and display it in a matplotlib figure
while game not over :
if its player 1's turn, get player 1's valid mouse input,
otherwise get player 2's
once we've got a valid mouse click, update game to make the
corresponding move for the current player's turn
update the figure to display this change
check if someone's won or game's a draw, only upon which do we
break out of the while
after having a result, report the answer, do some book keeping, and
then return from the app
------
I've not been able to figure out how to unwind this app into
something that only needs to progress when there's been a valid mouse
click. If I understand your suggestion correctly, it seems the entire
app should be the callback, but the processing of the clicks by the
app is complicated.
I wonder if you mean I should massage the app so that it IS the
callback, but its got enough state that to figure out how to execute
the appropriate next portion of code seems like it would be a big
mess (e.g. I'd have to write some kind of FSM whose transitions were
mouse clicks). I might be able to make this work, but its gonna be
ugly. It also breaks some of the OO I'd been using in other settings.
What I think I want is a way to get blocking valid mouse input. I had
thought the Python yield statement might help me (for instance, when
I'm supposed to get the next mouse click, I call yield and then the
callback would somehow wake the application back up), but it is
described in Python as being used only with generator functions, so I
don't think that does the trick.
I'm fairly new to Python, and even more so to maptlotlib, but I've
used matlab plenty. There, there's a ginput function that returns a
value only when the mouse's been clicked. Obviously there's some dual-
threading going on, but I've never had to write it myself.
I've spent several hours searching on the internet and haven't come
up with much. One scheme that might work would be to use sockets to
control the passing of info. But that seems overkill.
A big part of my problem from the matplotlib end is the only info
I've been able to find on using mouse clicks are basically not app-
based, e.g. http://www.scipy.org/Cookbook/Matplotlib/
Interactive_Plotting. There, the callbacks simply redraw the screen
by labeling data or whatnot, but there's no sophisticated "main"
program running at the same time.
Any ideas?
Thx,
--b
|
|
From: Werner F. B. <wer...@fr...> - 2007-04-05 07:28:08
|
Hi Archana,
Archana Ganesan wrote:
> ...
> trial.py is as follows.
>
> from pylab import *
>
> x = xrange(10)
> plot(x)
> savefig("trial.png")
>
The setup.py you are using will not work, it is meant for a matplotlib
embedded in wx, and even for that some lines are commented out.
Can you try the setup.py I sent yesterday with which I included
simple_plot.py, which is a script using pylab as you do in your trial.py.
Werner
|
|
From: Christopher B. <Chr...@no...> - 2007-04-05 05:09:37
|
Simson Garfinkel wrote: > I'm embarrassed to ask that I'm having trouble building/installing > matplotlib on an intel Mac. Don't be embarassed -- it's really pretty hard! All the various pythons (Universal, fink, darwinports, etc) for OS-X confuse things a lot, but I think you'll get the best support if you stick with the "official" framework Universal build: http://www.python.org/download/ You can also get it from: http://www.pythonmac.org/packages/py25-fat/index.html The cool thing about that site is that you can get a bunch of pr-built compatible packages from there also. Unfortunately, the matplotlib there right now doesn't appear to work with the latest wxPython. I'm not sure which wxPython version it is built against, but it crashed for me when used with wxPython2.8.3 The good news is, as I understand it, is the Ken McIvor patched the most recent MPL to use wxPython 2.8b features that allow you to build MPL without linking to wxPython. Hopefully someone will do a build that works with wxPython2.8.3 and put it up on the pythonmac site soon. I may even do it, but I haven't needed to for a while, so I don't have it all set up at this point. If you're going to built it yourself, still use the pythonmac packages for everything else, you'll be glad you did. -Chris |
|
From: Bill C. <bc...@wo...> - 2007-04-05 03:29:33
|
Hi, I'm wondering if anyone has tried to build matplotlib on hpux with = the hp compilers. I'm running on 11i and python 2.4.3. I've = essentially built my own Makefile(s) with all of the hacks I've had to = make to distutils but I am still not there. Any help/suggestions are = appreciated (aside from running on a different platform or using gcc ;-) |
|
From: Archana G. <arc...@gm...> - 2007-04-05 03:02:29
|
Hii, I get the following error. Traceback (most recent call last): File "trial.py", line 1, in ? File "pylab.pyo", line 1, in ? File "matplotlib\pylab.pyo", line 203, in ? File "matplotlib\axes.pyo", line 16, in ? File "matplotlib\axis.pyo", line 19, in ? File "matplotlib\patches.pyo", line 42, in ? File "matplotlib\patches.pyo", line 79, in Patch File "matplotlib\cbook.pyo", line 352, in dedent AttributeError: 'NoneType' object has no attribute 'splitlines' If I comment it out I am getting the error. I have installed the following: Python 2.4.4 http://www.python.org/download/releases/2.4.4/<https://webmailapp5.cc.utexas.edu/horde-2.2.9-assign/util/go.php?url=http%3A%2F%2Fwww.python.org%2Fdownload%2Freleases%2F2.4.4%2F&Horde=8f6e082f99784a0f28d75db1d492ba0f> wxPython runtime win32-unicode for Python 2.4 http://www.wxpython.org/download.php<https://webmailapp5.cc.utexas.edu/horde-2.2.9-assign/util/go.php?url=http%3A%2F%2Fwww.wxpython.org%2Fdownload.php&Horde=8f6e082f99784a0f28d75db1d492ba0f> matplotlib-0.90.0.win32-py2.4.exe http://sourceforge.net/project/showfiles.php?group_id=80706<https://webmailapp5.cc.utexas.edu/horde-2.2.9-assign/util/go.php?url=http%3A%2F%2Fsourceforge.net%2Fproject%2Fshowfiles.php%3Fgroup_id%3D80706&Horde=8f6e082f99784a0f28d75db1d492ba0f> numpy-1.0.1.win32-py2.4.exe http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103<https://webmailapp5.cc.utexas.edu/horde-2.2.9-assign/util/go.php?url=http%3A%2F%2Fsourceforge.net%2Fproject%2Fshowfiles.php%3Fgroup_id%3D1369%26package_id%3D175103&Horde=8f6e082f99784a0f28d75db1d492ba0f> setup.py is as follows. from distutils.core import setup import os from os.path import join import shutil import glob import py2exe from py2exe.build_exe import py2exe import sys import matplotlib mpdir, mpfiles = matplotlib.get_py2exe_datafiles() # cleanup dist and build directory first (for new py2exe version) if os.path.exists("dist/prog"): shutil.rmtree("dist/prog") if os.path.exists("dist/lib"): shutil.rmtree("dist/lib") if os.path.exists("build"): shutil.rmtree("build") # # # options for py2exe options = {"py2exe": {"compressed": 1, "optimize": 2, "packages": ["encodings", ## "kinterbasdb", "pytz", "matplotlib.numerix", ## "email", ## "numpy" ## "PIL", ], # "includes": "matplotlib.numerix.random_array", "excludes": ["MySQLdb", "Tkconstants", "Tkinter", "tcl", "orm.adapters.pgsql", "orm.adapters.mysql" ], "dll_excludes": ["tcl84.dll", "tk84.dll", "wxmsw26uh_vc.dll"] } } zipfile = r"lib\library.zip" setup( classifiers = ["Copyright:: your name", "Development Status :: 5 Stable", "Intended Audience :: End User", "License :: Shareware", "Operating System :: Microsoft :: Windows 2000", "Operating System :: Microsoft :: Windows XP", "Operating System :: Microsoft :: Windows 9x", "Programming Language :: Python, wxPython", "Topic :: Home Use" "Natural Language :: German", "Natural Language :: French", "Natural Language :: English"], # windows = [wx_emb], console = ['trial.py'], options = options, zipfile = zipfile, data_files = [("lib\\matplotlibdata", mpfiles), matplotlib.get_py2exe_datafiles() # if you don't use the lib option #### ("prog\\amaradata", amaradata), #### ("prog\\amaradata\\Schemata", amaraschemata), #### ("prog\\", python4dll) ] ) trial.py is as follows. from pylab import * x = xrange(10) plot(x) savefig("trial.png") Kindly help. thank you. Archana. My trial.py is as follows On 4/2/07, Werner F. Bruhin <wer...@fr...> wrote: > > Hi Archana, > > Archana Ganesan wrote: > > Hi, > > > > I tried following the instructions at the py2exe site and I have also > > uncommeneted and made it include the matplotlib.numerix package. Still > > it doesnt seem to work. Is there any other way of compiling it into an > > executable? > Did you try to compile the sample I enclosed the other day? Did that > work? If not what error are you getting. > > Are you using numpy or ? > > Provide a small sample (with no dependencies if possible) which does not > work for you with the corresponding setup.py. > > Werner > |
|
From: Alan G I. <ai...@am...> - 2007-04-05 02:49:30
|
On Wed, 4 Apr 2007, John Hunter apparently wrote: > If anyone has any comments or objections to this plan, speak now. Comment: great plan! Cheers, Alan Isaac |
|
From: Bill B. <wb...@gm...> - 2007-04-05 02:24:48
|
On 4/5/07, John Hunter <jd...@gm...> wrote: > in a recent thread on the matplotlib-devel list > > http://thread.gmane.org/gmane.comp.python.matplotlib.devel/2646 > > we've been discussing a plan to jettison support for the three array > packages in matplotlib. +1 from me. I don't use the older packages at all. --bb |