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
(13) |
2
(3) |
|
3
(4) |
4
(24) |
5
(12) |
6
(11) |
7
(14) |
8
(17) |
9
(3) |
|
10
(5) |
11
(23) |
12
(7) |
13
(9) |
14
(17) |
15
(1) |
16
(2) |
|
17
(2) |
18
(11) |
19
(14) |
20
(9) |
21
(13) |
22
(12) |
23
(1) |
|
24
|
25
(7) |
26
(11) |
27
(20) |
28
(19) |
29
(11) |
30
(1) |
|
From: John H. <jd...@gm...> - 2007-06-06 19:16:41
|
On 6/6/07, Nicolas <nic...@ya...> wrote: > Unfortunately, I didn't use instantiated Polygon items myself, so for now I > can't figure which part of my code produces indirectly such empty > Polygons... > > May it be however possible to modify a little matplotlib code, so as to > assure the compatibility with the previous existing versions of matplotlib ? > Something like : I don't have a problem with this, but it just makes it easier for latent bugs in your code to remain hidden. Should we raise in the Polygon constructor is you pass in an empty list of vertices? Of course, you can always set xy directly, so this won't catch all the errors unless we use properties or traits. JDH |
|
From: David G. <Dav...@no...> - 2007-06-06 16:20:26
|
Thanks for doing this Russell; it installed, imported, and confirmed version fine on my Intel Mac (but I haven't actually had a chance to "use" it yet). DG Chr...@no... wrote: > David, > > Can you test this? > > -CHB > > > -------- Original Message -------- > Subject: [Matplotlib-users] matplotlib 0.90.1 binary installer for Mac > Date: Mon, 04 Jun 2007 14:19:18 -0700 > From: Russell E. Owen <ro...@ce...> > Organization: University of Washington > To: mat...@li... > > I've built a binary installer for matplotlib 0.90.1 for Mac that > includes support for: > - TkAgg that works with a user-installed Aqua Tcl/Tk (unlike the > standard build) or the standard old Tcl/Tk from Apple > - WXAgg using wxPython 2.8. > > I've only checked WXAgg and TKAgg on my PPC Mac. If anyone could test it > on an Intel Mac I would be grateful. > > For now you can get it here: > <http://www.astro.washington.edu/rowen/pythonpackages/> > > In the long run it will be available here: > <http://pythonmac.org/packages/py25-fat/index.html> > > -- Russell > > P.S. Build instructions are here: > <http://www.astro.washington.edu/rowen/BuildingMatplotlibForMac.html> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- ERD/ORR/NOS/NOAA <http://response.restoration.noaa.gov/emergencyresponse/> |
|
From: John H. <jd...@gm...> - 2007-06-06 15:25:38
|
On 6/6/07, Matthias Michler <Mat...@gm...> wrote: > By the way: What do you think about the "insert a 'l' or 'g' into your TextBox > and get a grid or log-scale"-issue? Is there a possibility to switch the > mpl-meaning of 'l', 'g' and 'f' off? Yes, this is clearly an issue that has to be dealt with in a cleanup. The current implementation has no concept of whether the text box is the active widget. We would need to do something like activate the text box when you click on it (and figure out the right cursor location based on the click if there is already text in there) and deactivate it on a carriage return or click in another axes. The current implementation was only a proof of concept. JDH |
|
From: Matthias M. <Mat...@gm...> - 2007-06-06 15:11:44
|
Hello John, first of all thank you very much for adding this patch. By the way: What do you think about the "insert a 'l' or 'g' into your TextBox and get a grid or log-scale"-issue? Is there a possibility to switch the mpl-meaning of 'l', 'g' and 'f' off? best regards, Matthias On Wednesday 06 June 2007 16:19, John Hunter wrote: > On 6/6/07, Matthias Michler <Mat...@gm...> wrote: > > Some time ago I posted a suggestion to that (subject: 'additional key > > events'), which may be got lost among the lots of mpl-mails. > > I just send the patch once more, because I think it would be helpful > > for such a prompt. > > Thanks for the reminder -- this is indeed a useful patch. I just > committed it. > > I'd like to do a few enhancements to the text box widget and then add > it to svn. > > JDH |
|
From: John H. <jd...@gm...> - 2007-06-06 14:47:03
|
On 6/5/07, Erik Wickstrom <er...@er...> wrote: > ax = fig.add_subplot(111) > #from pylab import * > N = 7 > menMeans = (20, 35, 30, 35, 27, 21, 60) > ind = arange(N) # the x locations for the groups > #print ind > width = 0.35 # the width of the bars > ax = bar(ind, menMeans, width, color='b') You have commented out the line 'from pylab import *' which is the right thing for a web app server. But then you wrote ax = bar(ind, menMeans, width, color='b') which should raise a NameError because bar is defined in the pylab namespace. So it looks like somewhere in your code which you are not showing to us you have imported from pylab, which is wrong. What you want to do is ax = fig.add_subplot(111) ax.bar(ind, menMeans, width, color='b') and after that, read the user's guide, tutorial, the FAQ http://matplotlib.sourceforge.net/faq.html#OO, and the API tutorial http://matplotlib.sourceforge.net/leftwich_tut.txt <wink> JDH |
|
From: John H. <jd...@gm...> - 2007-06-06 14:19:25
|
On 6/6/07, Matthias Michler <Mat...@gm...> wrote: > Some time ago I posted a suggestion to that (subject: 'additional key > events'), which may be got lost among the lots of mpl-mails. > I just send the patch once more, because I think it would be helpful > for such a prompt. Thanks for the reminder -- this is indeed a useful patch. I just committed it. I'd like to do a few enhancements to the text box widget and then add it to svn. JDH |
|
From: Matthias M. <Mat...@gm...> - 2007-06-06 14:00:34
|
Hello everybody, first of all I want to thank John for his work on the textbox - it really looks better than mine. On Tuesday 05 June 2007 19:16, Mark Bakker wrote: > I just saw in the code: > if event.key is None: # simulate backspace > So it works properly, > Mark In my opinion it would be a better soluton to generally add some more key-events (e.g. enter and backspace) than to simulate backspace with all 'None'-keys. Some time ago I posted a suggestion to that (subject: 'additional key events'), which may be got lost among the lots of mpl-mails. I just send the patch once more, because I think it would be helpful for such a prompt. best regards, Matthias > On 6/5/07, Mark Bakker <ma...@gm...> wrote: > > I notice the alignment problem. > > But it looks like you are close. > > On my machine (win32), the 'enter' key didn't work either. It works like > > a backspace. That sounds like what Matthias reported. > > Mark > > > > On 6/5/07, John Hunter <jd...@gm...> wrote: > > > On 6/5/07, John Hunter <jd...@gm...> wrote: > > > > I worked on this some time ago, I never got to the point where I > > > > thought it was ready for production but it is close. There is a > > > > problem if usetex is enabled, because partial tex strings will cause > > > > errors. But you can use it with regular text or plain text. > > > > > > Typo: "plain text" was meant to be "math text" > > > > > > Now I remember what really bothered me about this widget, and it > > > wasn't just the usetex problem. The problem is that mpl has three > > > different vertical alignment methods for text: top, bottom and center. > > > None of them are right for a text box: you want baseline. Try typing > > > "thinking" into the text box and watch what happens when you add and > > > remove the "g". We do need to support baseline alignment for text, so > > > if someone has an interest in adding this it would be a very useful > > > feature, not just for a text box for for text alignment (eg tick > > > labels) in general. > > > > > > See the image of the "g" at > > > http://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-3.html > > > for a visual representation -- hwat I am calling the "baseline" they > > > refer to as the "origin" in that graph. Our default alignment should > > > be "origin" or "baseline" but we don't have support for that. > > > > > > JDH |
|
From: David T. <dav...@gm...> - 2007-06-06 11:55:00
|
Hi, Back with same problem when embedding in gtk. I would like to enable the key pressed event (key '1' '2' 'a' 'g' .. ) of NavigationToolbar2 in my pyGTK app. (These keys shortcut are described here: (or see PS of this email) http://sourceforge.net/tracker/index.php?func=detail&aid=1432252&group_id=80706&atid=560722 ) The shorcuts work perfectly using pylab. But when I include matplotlib in my pyGTK app the shorcuts are broken. Example of the two version (pylab: two_scales.py and pygtk: two_scales_embedded_in_gtk2 ) are attached to this email. How could I manage to make them work ? Thanks for your help. David PS """ NavigationToolbar2 now manages overlapping axes correctly when the axes overlap like in two_scales.py, NavigationToolbar2 only managed one axe. For example, when zooming or panning, only the left y scale will move. With the patch, both axes will move. It is also possible to select only one axe by pressing a digit. pressing '1' will enable navigation (set_navigate()) only on the first axe under the cursor. pressing '2' will enable navigation only on the second axe under the cursor. Also, the LocationEvent.inaxes will behave accordingly. For example, pressing 'g' will enable the grid on the selected axe. pressing 'a' will reenable all axes under the cursor. """ |
|
From: Iyer <mas...@ya...> - 2007-06-06 03:38:51
|
Hi folks,
I have a marker on a plot that is 5 units long, if I
resize the figure, the markers don't get resized
appropriately. How do I address this?
code snippet to display markers:
self.axes.annotate("text", xy=(0.5, 0.5),
markerprops=dict(marker=TICKRIGHT,
markerfacecolor='black', markersize=5,
markeredgecolor='black',
markeredgewidth = 2),)
-iyer
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting
|
|
From: Erik W. <er...@er...> - 2007-06-05 21:36:30
|
Hi,
I'm trying to plot a barchart for use in a django site. It's creating
a blank chart image though.(attached).
What am I doing wrong?
from pylab import *
def chart(request):
from PIL import Image as PILImage
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
from StringIO import StringIO
fig = Figure(figsize=(6,4))
canvas = FigureCanvas(fig)
ax = fig.add_subplot(111)
#from pylab import *
N = 7
menMeans = (20, 35, 30, 35, 27, 21, 60)
ind = arange(N) # the x locations for the groups
#print ind
width = 0.35 # the width of the bars
ax = bar(ind, menMeans, width, color='b')
#ylabel('Time')
title('Time In Minutes - Last 7 Days')
xticks(ind+width, ('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', '*') )
fig.set_facecolor('w')
canvas.draw()
size = canvas.get_renderer().get_canvas_width_height()
buf=canvas.tostring_rgb()
im=PILImage.fromstring('RGB', size, buf, 'raw', 'RGB', 0, 1)
imdata=StringIO()
im.save(imdata, format='PNG')
response = HttpResponse(imdata.getvalue(), mimetype='image/png')
return response
Thanks!
Erik
|
|
From: Werner F. B. <wer...@fr...> - 2007-06-05 17:30:16
|
Hi Andrew,
Andrew Straw wrote:
> Dear Werner,
>
> This seems to be an unintended side-effect of reorganizing the mpl
> data file location that I did prior to this release. (I.e. it's not
> your code that broke, I think it's mpl.) Unfortunately, since I didn't
> (and still don't) use py2exe, it will be hard for me to fix this. Can
> you send a patch that gets py2exe working again?
The work around I did is using glob.glob instead as follows:
# matplotlib data
##mpdir, mpfiles = matplotlib.get_py2exe_datafiles()
mpfiles = glob.glob('C:\Python25\lib\site-packages\matplotlib\mpl-data\*.*')
But I can't confirm yet that this works as I am also trying out
something else in my InnoSetup script. Will confirm ASAP and will try
and look into matplotlib.get_py2exe_datafiles() and see how it could be
fixed.
Best regards
Werner
|
|
From: Mark B. <ma...@gm...> - 2007-06-05 17:16:42
|
I just saw in the code: if event.key is None: # simulate backspace So it works properly, Mark On 6/5/07, Mark Bakker <ma...@gm...> wrote: > > I notice the alignment problem. > But it looks like you are close. > On my machine (win32), the 'enter' key didn't work either. It works like a > backspace. That sounds like what Matthias reported. > Mark > > On 6/5/07, John Hunter <jd...@gm...> wrote: > > > > On 6/5/07, John Hunter <jd...@gm...> wrote: > > > > > I worked on this some time ago, I never got to the point where I > > > thought it was ready for production but it is close. There is a > > > problem if usetex is enabled, because partial tex strings will cause > > > errors. But you can use it with regular text or plain text. > > > > Typo: "plain text" was meant to be "math text" > > > > Now I remember what really bothered me about this widget, and it > > wasn't just the usetex problem. The problem is that mpl has three > > different vertical alignment methods for text: top, bottom and center. > > None of them are right for a text box: you want baseline. Try typing > > "thinking" into the text box and watch what happens when you add and > > remove the "g". We do need to support baseline alignment for text, so > > if someone has an interest in adding this it would be a very useful > > feature, not just for a text box for for text alignment (eg tick > > labels) in general. > > > > See the image of the "g" at > > http://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-3.html > > for a visual representation -- hwat I am calling the "baseline" they > > refer to as the "origin" in that graph. Our default alignment should > > be "origin" or "baseline" but we don't have support for that. > > > > JDH > > > > |
|
From: Mark B. <ma...@gm...> - 2007-06-05 17:15:29
|
I notice the alignment problem. But it looks like you are close. On my machine (win32), the 'enter' key didn't work either. It works like a backspace. That sounds like what Matthias reported. Mark On 6/5/07, John Hunter <jd...@gm...> wrote: > > On 6/5/07, John Hunter <jd...@gm...> wrote: > > > I worked on this some time ago, I never got to the point where I > > thought it was ready for production but it is close. There is a > > problem if usetex is enabled, because partial tex strings will cause > > errors. But you can use it with regular text or plain text. > > Typo: "plain text" was meant to be "math text" > > Now I remember what really bothered me about this widget, and it > wasn't just the usetex problem. The problem is that mpl has three > different vertical alignment methods for text: top, bottom and center. > None of them are right for a text box: you want baseline. Try typing > "thinking" into the text box and watch what happens when you add and > remove the "g". We do need to support baseline alignment for text, so > if someone has an interest in adding this it would be a very useful > feature, not just for a text box for for text alignment (eg tick > labels) in general. > > See the image of the "g" at > http://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-3.html > for a visual representation -- hwat I am calling the "baseline" they > refer to as the "origin" in that graph. Our default alignment should > be "origin" or "baseline" but we don't have support for that. > > JDH > |
|
From: John H. <jd...@gm...> - 2007-06-05 16:43:50
|
On 6/5/07, John Hunter <jd...@gm...> wrote: > I worked on this some time ago, I never got to the point where I > thought it was ready for production but it is close. There is a > problem if usetex is enabled, because partial tex strings will cause > errors. But you can use it with regular text or plain text. Typo: "plain text" was meant to be "math text" Now I remember what really bothered me about this widget, and it wasn't just the usetex problem. The problem is that mpl has three different vertical alignment methods for text: top, bottom and center. None of them are right for a text box: you want baseline. Try typing "thinking" into the text box and watch what happens when you add and remove the "g". We do need to support baseline alignment for text, so if someone has an interest in adding this it would be a very useful feature, not just for a text box for for text alignment (eg tick labels) in general. See the image of the "g" at http://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-3.html for a visual representation -- hwat I am calling the "baseline" they refer to as the "origin" in that graph. Our default alignment should be "origin" or "baseline" but we don't have support for that. JDH |
|
From: Andrew S. <str...@as...> - 2007-06-05 16:27:48
|
Dear Werner, This seems to be an unintended side-effect of reorganizing the mpl data file location that I did prior to this release. (I.e. it's not your code that broke, I think it's mpl.) Unfortunately, since I didn't (and still don't) use py2exe, it will be hard for me to fix this. Can you send a patch that gets py2exe working again? Thanks, Andrew Werner F. Bruhin wrote: > Werner F. Bruhin wrote: > >> John Hunter wrote: >> >> >>> matplotlib 0.90.1 is out and available for download from the sourceforge site. >>> >>> >>> >> When trying to package my application with py2exe I get the following error: >> >> Traceback (most recent call last): >> File "setup.py", line 141, in <module> >> mpdir, mpfiles = matplotlib.get_py2exe_datafiles() >> File "C:\Python25\Lib\site-packages\matplotlib\__init__.py", line 369, >> in get_py2exe_datafiles >> mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib'])) >> ValueError: list.remove(x): x not in list >> >> > To work around this I just put a try/except in: > try: > # Need to explicitly remove cocoa_agg files or py2exe complains > mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib'])) > except: > pass > > But I then get this error: > error: can't copy > 'C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts': doesn't exist > or not a regular file > > I guess I will have to review how I am using the get_py2exe_datafiles stuff. > > Werner > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: John H. <jd...@gm...> - 2007-06-05 16:13:08
|
On 6/5/07, Mark Bakker <ma...@gm...> wrote:
>
> I think a prompt could be very useful in MPL, just to build small little
> GUI's that only need 1 or 2 boxes.
> I also realize it is not easy, and for bigger jobs you want a full GUI
> environment like wx or Tk anyway, so I understand it when developers set
> other priorities.
> Then again, I would really use it,
> Mark
>
> > From: Matthias Michler < Mat...@gm...>
> >
> > Hello everybody,
> >
> > Now my question is: Could a prompt be a useful part of matplotlib?
I worked on this some time ago, I never got to the point where I
thought it was ready for production but it is close. There is a
problem if usetex is enabled, because partial tex strings will cause
errors. But you can use it with regular text or plain text.
Give it a whirl -- I don't mind including tit in matplotlib.widgets
if people think it would be usefult. I do think there is a niche for
these kinds of things where people want brain dead simple widgets w/o
having to deal with GUI toolkits.
I'm pasting the example below, and also attaching it in case the lines
get wrapped
# usetex not supported
import matplotlib
matplotlib.rcParams['text.usetex'] = False
import matplotlib.transforms as transforms
import matplotlib.widgets as widgets
from pylab import figure, show, nx
class TextBox(widgets.Widget):
def __init__(self, ax, s=''):
self.canvas = ax.figure.canvas
self.text = ax.text(0.025, 0.2, s,
fontsize=14,
#verticalalignment='baseline',
horizontalalignment='left',
transform=ax.transAxes)
self.ax = ax
ax.set_yticks([])
ax.set_xticks([])
ax.set_navigate(False)
self.canvas.draw()
self.canvas.mpl_connect('key_press_event', self.keypress)
self.region = self.canvas.copy_from_bbox(ax.bbox)
r = self._get_text_right()
self.cursor, = ax.plot([r,r], [0.2, 0.8], transform=ax.transAxes)
self.redraw()
def redraw(self):
self.ax.redraw_in_frame()
self.canvas.blit(self.ax.bbox)
def keypress(self, event):
if event.key is not None and len(event.key)>1: return
t = self.text.get_text()
if event.key is None: # simulate backspace
if len(t): newt = t[:-1]
else: newt = ''
else:
newt = t + event.key
self.text.set_text(newt)
r = self._get_text_right()
self.cursor.set_xdata([r,r])
self.redraw()
def _get_text_right(self):
l,b,w,h = self.text.get_window_extent().get_bounds()
r = l+w+2
t = b+h
s = self.text.get_text()
# adjust cursor position for trailing space
numtrail = len(s) - len(s.rstrip())
en = self.ax.get_renderer_cache().points_to_pixels(self.text.get_fontsize())/2.
r += numtrail*en
l,b = self.ax.transAxes.inverse_xy_tup((l,b))
r,t = self.ax.transAxes.inverse_xy_tup((r,t))
return r
fig = figure()
ax = fig.add_axes([0.1, 0.1, 0.8, 0.7])
ax.plot([1,2,3])
#rc('text', usetex=1)
fig.text(0.39, 0.875, 'My label: ',
horizontalalignment='right', verticalalignment='center')
axtext = fig.add_axes([0.4, 0.85, 0.5, 0.05])
box = TextBox(axtext)
show()
|
|
From: Mark B. <ma...@gm...> - 2007-06-05 14:52:24
|
I think a prompt could be very useful in MPL, just to build small little GUI's that only need 1 or 2 boxes. I also realize it is not easy, and for bigger jobs you want a full GUI environment like wx or Tk anyway, so I understand it when developers set other priorities. Then again, I would really use it, Mark From: Matthias Michler <Mat...@gm...> > > Hello everybody, > > Now my question is: Could a prompt be a useful part of matplotlib? > |
|
From: Werner F. B. <wer...@fr...> - 2007-06-05 14:19:39
|
Werner F. Bruhin wrote:
> John Hunter wrote:
>
>> matplotlib 0.90.1 is out and available for download from the sourceforge site.
>>
>>
> When trying to package my application with py2exe I get the following error:
>
> Traceback (most recent call last):
> File "setup.py", line 141, in <module>
> mpdir, mpfiles = matplotlib.get_py2exe_datafiles()
> File "C:\Python25\Lib\site-packages\matplotlib\__init__.py", line 369,
> in get_py2exe_datafiles
> mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib']))
> ValueError: list.remove(x): x not in list
>
To work around this I just put a try/except in:
try:
# Need to explicitly remove cocoa_agg files or py2exe complains
mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib']))
except:
pass
But I then get this error:
error: can't copy
'C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts': doesn't exist
or not a regular file
I guess I will have to review how I am using the get_py2exe_datafiles stuff.
Werner
|
|
From: Werner F. B. <wer...@fr...> - 2007-06-05 14:14:10
|
John Hunter wrote:
> matplotlib 0.90.1 is out and available for download from the sourceforge site.
>
When trying to package my application with py2exe I get the following error:
Traceback (most recent call last):
File "setup.py", line 141, in <module>
mpdir, mpfiles = matplotlib.get_py2exe_datafiles()
File "C:\Python25\Lib\site-packages\matplotlib\__init__.py", line 369,
in get_py2exe_datafiles
mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib']))
ValueError: list.remove(x): x not in list
Werner
|
|
From: Werner F. B. <wer...@fr...> - 2007-06-05 08:10:23
|
John, John Hunter wrote: > On 6/4/07, Werner F. Bruhin <wer...@fr...> wrote: >> John Hunter wrote: >> > matplotlib 0.90.1 is out and available for download from the >> sourceforge site. >> > >> Just installed it. Works very nicely with the exception of some font >> issue. >> >> I am getting this: >> Could not match Bitstream Vera Serif, New Century Schoolbook, Century >> Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times >> New Roman, Times, Palatino, Charter, serif, normal, normal. Returning >> C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf > > make sure you are picking up the most recent matplotlibrc. We changed > the font ordering some time ago. Then run with --verbose-helpful and > post the output, maybe --verbose-debug, and we will see if we can > figure out what is going on. I haven't run under windows for some > time. > Works the first time after I removed the cache file. Looking at the file it might have something to do with Unicode, i.e. one of the two "/" is encoded as 'u0005C', see attached file. Werner |
|
From: Werner F. B. <wer...@fr...> - 2007-06-05 08:01:09
|
John, John Hunter wrote: > On 6/4/07, Werner F. Bruhin <wer...@fr...> wrote: >> John Hunter wrote: >> > matplotlib 0.90.1 is out and available for download from the >> sourceforge site. >> > >> Just installed it. Works very nicely with the exception of some font >> issue. >> >> I am getting this: >> Could not match Bitstream Vera Serif, New Century Schoolbook, Century >> Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times >> New Roman, Times, Palatino, Charter, serif, normal, normal. Returning >> C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf > > make sure you are picking up the most recent matplotlibrc. I don't have a custom rc file, i.e. this is with the 0.90.1 installed matplotlibrc. > We changed > the font ordering some time ago. Then run with --verbose-helpful and > post the output, maybe --verbose-debug, and we will see if we can > figure out what is going on. I haven't run under windows for some > time. I attached the verbose-debug output. Maybe to do with the fontcache? Will try this in a moment and let you know if it corrected the issue. Werner > > |
|
From: fred <fr...@gm...> - 2007-06-04 23:37:45
|
Hi, My issue is quite simple: I reload several times an image with the colorbar enabled, and thus, I have several colorbars, not only one. How can I disable this, and thus, get only one colorbar ? Cheers, -- http://scipy.org/FredericPetit |
|
From: Mark T. <m.t...@uc...> - 2007-06-04 21:41:31
|
Hi
Just installed numpy, numarray, scipy and matplotlib. All work fine execpt
pylab. When I try to import I get the following error message:
>>> from pylab import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packag
es/pylab.py", line 1, in <module>
from matplotlib.pylab import *
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packag
es/matplotlib/pylab.py", line 199, in <module>
import cm
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packag
es/matplotlib/cm.py", line 5, in <module>
import colors
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packag
es/matplotlib/colors.py", line 38, in <module>
from numerix import array, arange, take, put, Float, Int, putmask, \
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packag
es/matplotlib/numerix/__init__.py", line 20, in <module>
from matplotlib import rcParams, verbose
ImportError: cannot import name rcParams
Any thoughts on why?
Thanks
mark
--
Dr Mark G. Thomas
Department of Biology
University College London
Wolfson House,
4 Stephenson Way,
London,
NW1 2HE
Tel: ++44 (0) 207 679 7418 (int. 2-7418)
Fax: ++44 (0) 207 679 5052
Mobile: 07973 725955
Email: m.t...@uc...
Web: www.ucl.ac.uk/tcga/
|
|
From: Erik W. <er...@er...> - 2007-06-04 21:38:04
|
Hi John,
Ok- that makes sense.
While on the subject of bar charts, can you tell me what I'm doing wrong here?
def chart(request):
from PIL import Image as PILImage
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
from StringIO import StringIO
fig = Figure()
canvas = FigureCanvas(fig)
ax = fig.add_subplot(111)
from pylab import *
N = 7
menMeans = (20, 35, 30, 35, 27, 21, 60)
ind = arange(N) # the x locations for the groups
width = 0.35 # the width of the bars
p1 = bar(ind, menMeans, width, color='b')
#ylabel('Time')
title('Time In Minutes - Last 7 Days')
xticks(ind+width, ('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', '*') )
canvas.draw()
size = canvas.get_renderer().get_canvas_width_height()
buf=canvas.tostring_rgb()
im=PILImage.fromstring('RGB', size, buf, 'raw', 'RGB', 0, 1)
imdata=StringIO() #ERROR LINE - 'module' object is not callable
im.save(imdata, format='PNG')
response = HttpResponse(imdata.getvalue(), mimetype='image/png')
return response
I keep getting an error saying 'module' object is not callable
pointing to line 45 [imdata=StringIO()]
This method worked fine for a pie chart.
Thanks!
Erik
On 6/4/07, John Hunter <jd...@gm...> wrote:
> On 6/4/07, Erik Wickstrom <er...@er...> wrote:
>
> > I'm trying to create a 3d bar chart like the one attached for use in a
> > django site. I have no idea where to start. Is it even possible with
> > matplotlib?
>
> Not really, and this is by design I've intentionally avoided all of
> these power point style features which mostly detract from the
> information in the graph. In a bar chart, once you've displayed the
> height of the bar, there is no additional information to be had by
> adding a gradient to it, or by making it look 3D. Those extra special
> effects confuse the information that the graph actually contains. In
> many cases, I think that's why people want to add them: if the data
> are boring or don't say what you want, why not spice it up with some
> sexy graph features so people won't look so hard at the data?
>
> The shadow on the pie chart was a nod to those who want "chart junk"
> as Tufte calls these effects, but it was probably a mistake.
>
> http://www.edwardtufte.com/tufte
>
> I might accept a patch to add features like this if they remained off
> by default, but I probably won't be adding it myself.
>
> JDH
>
|
|
From: <jo...@fh...> - 2007-06-04 21:26:50
|
On 04.06.2007, at 23:19, Russell E. Owen wrote: > I've only checked WXAgg and TKAgg on my PPC Mac. If anyone could =20 > test it > on an Intel Mac I would be grateful. I have tested the MacPorts port of matplotlib 0.90.1 with GTKAgg on =20 OS X Intel -- that works. Greetings, Jochen --=20 Einigkeit und Recht und Freiheit http://www.Jochen-=20 Kuepper.de Libert=E9, =C9galit=E9, Fraternit=E9 GnuPG key: = CC1B0B4D Sex, drugs and rock-n-roll |