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
(2) |
2
(6) |
3
(4) |
4
(2) |
5
(6) |
6
(1) |
7
(1) |
|
8
|
9
(17) |
10
(5) |
11
(15) |
12
(5) |
13
(7) |
14
|
|
15
(3) |
16
(2) |
17
(8) |
18
(16) |
19
(15) |
20
(4) |
21
(1) |
|
22
(3) |
23
|
24
(1) |
25
(3) |
26
(2) |
27
(7) |
28
(1) |
|
29
|
30
(12) |
31
(7) |
|
|
|
|
|
From: Jean-Michel P. <jea...@ir...> - 2004-08-17 09:01:28
|
Hi,
I'm new to matplotlib which is really good job ;-) and I'm currently
fighting against character encodings :-(.
Being working under win2k/western Europe, I finally found on the web
that using a cp850 source encoding definition was working with 'print'
only if you also encode your strings from cp1252! (for us/en users:
windows uses cp1252 but the console uses cp850, this message was written
using iso-8859-1).
Example:
# -*- coding: cp850 -*-
print unicode('texte français','cp1252')
>>> texte français
If I do the same with the matplotlib 0.54 'title' function I get an
error telling the 'ascii' codec cannot encode my 'ç':
# -*- coding: cp850 -*-
from matplotlib.matlab import *
plot([1,2,3,4])
title(unicode('texte français','cp1252'))
>>> Exception in tkinter callback
Traceback ...
[...]
font.set_text(s, 0.0) # ...
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe7' in
position 10: ordinal not in range(128)
-----------------
With matplotlib 0.61 I get this error:
>>> title(unicode('texte français','cp1252'))
Traceback (most recent call last):
File "<<console>>", line 1, in ?
File "C:\PYTHON23\Lib\site-packages\matplotlib\matlab.py", line 1576,
in title
draw_if_interactive()
File
"C:\PYTHON23\Lib\site-packages\matplotlib\backends\backend_gtk.py", line
582, in draw_if_interactive
figManager.canvas.draw()
File
"C:\PYTHON23\Lib\site-packages\matplotlib\backends\backend_gtkagg.py",
line 40, in draw
FigureCanvasAgg.draw(self)
File
"C:\PYTHON23\Lib\site-packages\matplotlib\backends\backend_agg.py", line
306, in draw
self.figure.draw(self.renderer)
File "C:\PYTHON23\Lib\site-packages\matplotlib\figure.py", line 236,
in draw
for a in self.axes: a.draw(renderer)
File "C:\PYTHON23\Lib\site-packages\matplotlib\axes.py", line 704, in
draw
self._title.draw(renderer)
File "C:\PYTHON23\Lib\site-packages\matplotlib\text.py", line 209, in
draw
bbox, info = self._get_layout(renderer)
File "C:\PYTHON23\Lib\site-packages\matplotlib\text.py", line 108, in
_get_layout
w,h = renderer.get_text_width_height(
File
"C:\PYTHON23\Lib\site-packages\matplotlib\backends\backend_agg.py", line
210, in get_text_width_height
font.set_text(s, 0.0) # the width and height of unrotated string
TypeError: CXX: type error.
---------------
I tried to add different encodings (ie. unicode('texte français',
'cp1252').encode(...) with utf-8, cp1252, cp850...) without success.
Naturally if I omit any unicode translation, it does not crash but the
string is not correctly rendered. Does it mean that matplotlib currently
expects 'ascii' strings only to passed to its text functions?
JM. Philippe
|
|
From: John H. <jdh...@ac...> - 2004-08-16 21:24:35
|
>>>>> "Shin" == Shin <sd...@em...> writes:
Shin> Following the docstring of matplotlib.dates, I tried the
Shin> following commands, but failed. It says there is no argument
Shin> needed when constructing PyDatetimeConverter object. If it
Shin> is true, how about correcting it right away because the
Shin> document is only one explaining its usage?
Done, thanks.
Early versions of the datetime converter supported time zones, but
there were problems in the implementation and I removed the feature.
The doc string was out of date.
JDH
|
|
From: Shin <sd...@em...> - 2004-08-16 21:09:40
|
Following the docstring of matplotlib.dates, I tried the following commands, but failed. It says there is no argument needed when constructing PyDatetimeConverter object. If it is true, how about correcting it right away because the document is only one explaining its usage? Python 2.3.3 (#2, Feb 17 2004, 11:45:40) Type "copyright", "credits" or "license" for more information. IPython 0.6.1.rc1 -- An enhanced Interactive Python. ? -> Introduction to IPython's features. @magic -> Information about IPython's 'magic' @ functions. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. In [1]: from matplotlib.dates import PyDatetimeConverter In [3]: from matplotlib.dates import Eastern In [4]: converter=PyDatetimeConverter(Eastern) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/sdhyok/catchlab/catchlab/catchlab/pkg/rhessys/test/<console> TypeError: this constructor takes no arguments -- Daehyok Shin (Peter) Geography Department Univ. of North Carolina-Chapel Hill |
|
From: John H. <jdh...@ac...> - 2004-08-15 17:27:56
|
>>>>> "Vineet" == Vineet Jain <vi...@al...> writes:
Vineet> Ok. I found the excursor_demo.py. However, it seems like
Vineet> this demo has a problem. When you expand tthe window. In
Vineet> addition to the cross hair there is a permanent cross and
Vineet> veritcal line where the cross hair was when the window was
Vineet> expanded.
Vineet> Any suggestion?
Hi Vineet,
Both examples are fixed in CVS. I'll send you the wx cursor demo in a
separate email.
Thanks for letting me know,
JDH
|
|
From: Vineet J. <vi...@al...> - 2004-08-15 03:24:00
|
Ok. I found the excursor_demo.py.
However, it seems like this demo has a problem. When you expand tthe window.
In addition to the cross hair there is a permanent cross and veritcal line
where the cross hair was when the window was expanded.
Any suggestion?
Vineet
-----Original Message-----
From: mat...@li...
[mailto:mat...@li...]On Behalf Of Vineet
Jain
Sent: Saturday, August 14, 2004 9:17 PM
To: mat...@li...
Subject: [Matplotlib-users] Problems with running cursor_demo on Wx
When running the cursor_demo with the wxAgg I get the following error:
C:\programming\matplotlib-0.61.0\examples>cursor_demo.py
Traceback (most recent call last):
File "C:\programming\matplotlib-0.61.0\examples\cursor_demo.py", line 87,
in ?
canvas.connect('motion_notify_event', cursor.mouse_move)
AttributeError: 'FigureCanvasWxAgg' object has no attribute 'connect'
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Vineet J. <vi...@al...> - 2004-08-15 02:17:02
|
When running the cursor_demo with the wxAgg I get the following error:
C:\programming\matplotlib-0.61.0\examples>cursor_demo.py
Traceback (most recent call last):
File "C:\programming\matplotlib-0.61.0\examples\cursor_demo.py", line 87,
in ?
canvas.connect('motion_notify_event', cursor.mouse_move)
AttributeError: 'FigureCanvasWxAgg' object has no attribute 'connect'
|
|
From: Todd M. <jm...@st...> - 2004-08-13 21:59:09
|
I was informed that the windows binaries for numarray for matplotlib-0.61.0 were accidentally built without support for GTK. I uploaded new binaries this afternoon and they should make it to the SF mirrors soon (tomorrow?). Please consider downloading them if you're interested in the GTK backend and numarray. Regards, Todd Miller |
|
From: John H. <jdh...@ac...> - 2004-08-13 21:02:42
|
>>>>> "James" == James Boyle <bo...@ll...> writes:
James> The checkerboard goes to the edges but the color overlay
James> has a gap on the right and bottom. I have not been able to
James> figure this out.
Nor have I completely, yet. It's related to interpolation (worse for
bilinear and bicubic that nearest). matlab handles this (at least for
pcolor) by setting the axes lim to not include the last row. Eg, for
a 5x5 pcolor grid, the axes would be 4x4.
This is part of the problem, but there may be an off-by-one or
rounding error as well.
It's a priority to fix, only it ain't fixed yet!
JDH
|
|
From: James B. <bo...@ll...> - 2004-08-13 20:57:43
|
in the example directory the layer_images.py produces a plot that has space between the color plot and the axes on the right side and the bottom. This occurs if I use the PS or Agg backend. It is evident in the example plot in the 'Screenshots' examples: http://matplotlib.sourceforge.net/screenshots/layer_images_large.png The checkerboard goes to the edges but the color overlay has a gap on the right and bottom. I have not been able to figure this out. Thanks for any enlightenment. Jim |
|
From: Prabhu R. <pr...@ae...> - 2004-08-13 17:32:28
|
>>>>> "FP" == Fernando Perez <Fer...@co...> writes:
FP> The code already works fairly well, with one significant
FP> caveat: any process started via os.system() (whether directly
FP> or implicitly using !cmd) will hang after a while. I have
FP> currently no solution for this, but will welcome any ideas.
FP> Note that the problem seems to only affect long-running GUI
FP> apps, simple '!grep foo *' type things appear to function just
FP> fine. But something like '!gv foo.eps &' will open gv, and
FP> after about 30 seconds the gv instance stops responding to all
FP> keyboard/mouse input.
You probably already have tried this but how about using
os.spawnl(...). Here a simple use case:
pid = os.spawnl(os.P_NOWAIT, script, script)
cheers,
prabhu
|
|
From: Fernando P. <Fer...@co...> - 2004-08-13 15:46:09
|
Hi all, after help and discussions with John, I'm putting up AS ALPHA CODE, a small script which will load ipython in a multithreaded mode which allows it to run GTK gui apps, and in particular matplotlib with the GTK backends. Please note that using this requires at the moment _both_ CVS ipython and CVS matplotlib, since John and I have worked in conjunction to make the necessary changes. The code already works fairly well, with one significant caveat: any process started via os.system() (whether directly or implicitly using !cmd) will hang after a while. I have currently no solution for this, but will welcome any ideas. Note that the problem seems to only affect long-running GUI apps, simple '!grep foo *' type things appear to function just fine. But something like '!gv foo.eps &' will open gv, and after about 30 seconds the gv instance stops responding to all keyboard/mouse input. Debugging multithreaded code is _very_ tricky, but this tool may prove useful to many who want the interactive convenience of ipython combined with the better matplotlib backends, or other GTK apps. All feedback from willing testers will be very welcome. Note that those wanting to use matplotlib interactively, and willng to stick to the Tk backends, can already do so. Tk does not require manual threading control, so it works perfectly OK with normal ipython. John already posted in the past a 'pylab' ipython profile which loads and configures matplotlib for such use, I can repost it if necessary. This will become part of ipython 0.6.3, but I want to try to resolve the os.system() deadlock first. Since both John and I are complete ignoramuses on threading issues, help from anyone with knowledge on the topic is most welcome. If you don't want to update to CVS ipython/matplotlib but think you may have an idea, you can use this small shell for tests: http://amath.colorado.edu/faculty/fperez/tmp/pyint-gtk.py It provides a basic multithreaded shell as a standalone python script (no matplotlib or ipython needed), and will show the os.system() deadlock problem. Many thanks in advance for any feedback, and to John for all the help on this. We (I assume I speak for both John and I here :) hope you all find it useful. Best, f |
|
From: Vinj V. <vin...@ya...> - 2004-08-13 15:32:06
|
I second that. This is: - a great library and - an even better community - and above all built on a langauge that I love --- Darren Dale <dd...@co...> wrote: > I wanted to share a story. We are running our > experiment at the > synchrotron, which now includes a digital camera for > X-rays. We take a > LOT of pictures. Yesterday, the guys realized they > had no way to follow > the progress of the experiment, because they didnt > have a good way to > look at these pictures as they are being created. We > would be running blind. > > In a couple hours, I hacked together a working > program. Mostly, I > modified bits of your examples, specifically > dynamic_image_wxagg, plus > coords and a few others, and learned some things > about wx along the way. > The matplotlib event handling is great, I am putting > it to good use. > People in the lab are really impressed with the > quality of the plots, > and how quickly the code came together, both of > which I attribute to > your work. Thank you. > > Darren > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest > price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R > for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping > and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Darren D. <dd...@co...> - 2004-08-13 15:20:41
|
I wanted to share a story. We are running our experiment at the synchrotron, which now includes a digital camera for X-rays. We take a LOT of pictures. Yesterday, the guys realized they had no way to follow the progress of the experiment, because they didnt have a good way to look at these pictures as they are being created. We would be running blind. In a couple hours, I hacked together a working program. Mostly, I modified bits of your examples, specifically dynamic_image_wxagg, plus coords and a few others, and learned some things about wx along the way. The matplotlib event handling is great, I am putting it to good use. People in the lab are really impressed with the quality of the plots, and how quickly the code came together, both of which I attribute to your work. Thank you. Darren |
|
From: John H. <jdh...@ac...> - 2004-08-12 15:19:45
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes:
Darren> Hi All, My research group submitted a paper for
Darren> publication in a journal, and one of the requested changes
Darren> was having the tick-marks formatted like $1x10^{-4}$ (for
Darren> the latex-ers out there) rather than 1e-4, which was
Darren> considered an unnecessary use of mathematical jargon. I
Darren> wasn't the lead author on this particular paper, and
Darren> therefore the plots were not created using Python and
Darren> MPL. But I think this is a pretty standard formatting
Darren> requirement in the scientific community. Would the
Darren> creators of Matplotlib consider an option to format the
Darren> ticks like this (does this capability exist and I havent
Darren> found it yet)?
Yes, this would be nice. Of course, you can manually format the ticks
using mathtext, eg,
from matplotlib.matlab import *
rc('tick', labelsize=15)
a=[8E8,10E8, 15E8]
plot(a,a)
ticks = arange(8,16)
labels = ['$%d^{8}$'%val for val in ticks]
set(gca(), xticks=ticks*1e8, yticks=ticks*1e8,
xticklabels=labels, yticklabels=labels)
show()
but it would be nice to provide some automatic facilities for this.
Darren> In Matlab, when the tick labels require scientific
Darren> notation, only the decimal component is listed in each
Darren> tick label, and the exponential part is printed at the end
Darren> of the axis. In Igor, the exponential part can be included
Darren> in the y-axis label. Finally, one problem with formatting
Darren> tick labels is how to deal with data spanning small
Darren> ranges, but with large offsets, like
Darren> array(range(10))+1e10. Maybe there is an interest in
Darren> removing the offset from each tick label, and including it
Darren> elsewhere in the figure? Then again, maybe that's getting
Darren> too complicated.
This would definitely be a nice feature. It would require a little
architectural change in the formatter. Basically the formatter would
need to provide an additional method, eg get_offset, which would
return None (the current default) or a string like '$10^{-23}$. The
axis, which calls the formatter, could check this value, and if not
None, render it to the proper place (eg left of x axis). I could help
you with this part. Below I'll include a script example showing how
to plot a tick offset which you can currently use for figures.
Basically, we'd just want to automate something along these lines.
Darren> Is this attractive to the Matplotlib Gurus and Users? If
Darren> so, is it something I could work on, or would it be best
Darren> left to the masters?
There's only one path to becoming a master, of course, which is to
dive in. It would be great if you work on this. Getting ticking
right is pretty hard since there are so many pathological cases out
there. But it looks like you work with that kind of data so you'll be
in a good position to find and fix the problem spots. I think you
should take two approaches: 1) clean up the existing Locators and
Formatters when you find bugs and 2) define some new ones. It
shouldn't be too hard to define a new formatter that does the mathtext
formatting for exponential ticking you've alluded to above.
The only (minor) downside to doing mathtext formatting is that the
font is likely different than non-mathtext on your figure. There are
two ways to solve this: use the cmr font as the default for the entire
figure or better, support mathtext layout (super/subscripting) for any
font. Right now we use the computer modern fonts for mathtext because
they have all the symbols, but there is no reason (other than time)
that we can't use the mathtext layout algorithms for
super/subscripting of non symbol fonts.
Let me know how I can help...
JDH
# use an exponential tick offset
from matplotlib.matlab import *
rc('tick', labelsize=12)
a=[8E8,10E8, 15E8]
plot(a,a)
ticks = arange(8,16)
labels = ['%d'%val for val in ticks]
# place the offset in axes coords
t = text(-.075, -.075, r'$10^{8}\times$',
transform=gca().transAxes,
fontsize=14)
t.set_clip_on(False)
set(gca(), xticks=ticks*1e8, yticks=ticks*1e8,
xticklabels=labels, yticklabels=labels)
show()
|
|
From: Darren D. <dd...@co...> - 2004-08-12 14:16:56
|
Hi All,
My research group submitted a paper for publication in a journal, and
one of the requested changes was having the tick-marks formatted like
$1x10^{-4}$ (for the latex-ers out there) rather than 1e-4, which was
considered an unnecessary use of mathematical jargon. I wasn't the lead
author on this particular paper, and therefore the plots were not
created using Python and MPL. But I think this is a pretty standard
formatting requirement in the scientific community. Would the creators
of Matplotlib consider an option to format the ticks like this (does
this capability exist and I havent found it yet)?
In Matlab, when the tick labels require scientific notation, only the
decimal component is listed in each tick label, and the exponential part
is printed at the end of the axis. In Igor, the exponential part can be
included in the y-axis label. Finally, one problem with formatting tick
labels is how to deal with data spanning small ranges, but with large
offsets, like array(range(10))+1e10. Maybe there is an interest in
removing the offset from each tick label, and including it elsewhere in
the figure? Then again, maybe that's getting too complicated.
Is this attractive to the Matplotlib Gurus and Users? If so, is it
something I could work on, or would it be best left to the masters?
Darren
|
|
From: Shin, D. <sd...@em...> - 2004-08-12 14:12:52
|
> -----Original Message----- > From: John Hunter [mailto:jdh...@ni...] > Sent: Thursday, August 12, 2004 AM 8:49 > To: Shin > Cc: matplotlib-users > Subject: Re: [Matplotlib-users] better axis command? > > > > This is certainly easy enough - does matlab also support > > >> axis([-inf, 5, 0, 10]). > > in which case on the lower xlim is set automatically and the upper > xlim is 5? Yes. In my opinion, Using None is better than inf because inf should be imported seperately in numarray (from numarray.ieeespecial import nan, inf). > I didn't know matlab had them :-( I'll add them. In the meantime: > The xlim and ylim are ones I frequently use to adjust axis ranges. I am quite sure many users will like the addition. Note that xlim and ylim change only one axis without touching other axes, such as automatic scaling. Glad to contribute something to Matplotlib. Thanks for your effort. Daehyok Shin |
|
From: John H. <jdh...@ac...> - 2004-08-12 13:12:54
|
>>>>> "Shin" == Shin <sd...@em...> writes:
Shin> As you know, in MATLAB, axis([-inf inf 0 10]) means that the
Shin> range of x-axis is determined automatically while the range
Shin> of y-axis is set manually to the range from 0 to 10.
Shin> In current Matplotlib, it seems there is no support for that
Shin> kind of partial range setting. If so, how about adding a
Shin> little intelligence on the axis function, like
>>>> axis([None, None, 0, 10]).
This is certainly easy enough - does matlab also support
>> axis([-inf, 5, 0, 10]).
in which case on the lower xlim is set automatically and the upper
xlim is 5?
Shin> And, any specific reason there is no xlim or ylim function?
I didn't know matlab had them :-( I'll add them. In the meantime:
ax.set_xlim((xmin, xmax))
or
set(gca(), 'xlim', (xmin, xmax))
or
set(ax, xlim=(xmin, xmax))
and so on ...
Shin> -- Daehyok Shin (Peter) Geography Department Univ. of North
Shin> Carolina-Chapel Hill
Shin> -------------------------------------------------------
Shin> SF.Net email is sponsored by Shop4tech.com-Lowest price on
Shin> Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic
Shin> DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free
Shin> Shipping and Free Gift.
Shin> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
Shin> _______________________________________________
Shin> Matplotlib-users mailing list
Shin> Mat...@li...
Shin> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Shin <sd...@em...> - 2004-08-12 03:21:06
|
As you know, in MATLAB, axis([-inf inf 0 10]) means that the range of x-axis is determined automatically while the range of y-axis is set manually to the range from 0 to 10. In current Matplotlib, it seems there is no support for that kind of partial range setting. If so, how about adding a little intelligence on the axis function, like >>> axis([None, None, 0, 10]). And, any specific reason there is no xlim or ylim function? -- Daehyok Shin (Peter) Geography Department Univ. of North Carolina-Chapel Hill |
|
From: John H. <jdh...@ac...> - 2004-08-11 20:59:07
|
>>>>> "James" == James Boyle <bo...@ll...> writes:
James> In the following code I attempt to plot right and left
James> yaxis labels each with its own color. The left axis comes
James> out OK - red, medium The right axis comes out the default.
James> I have tried everything I could think of (admittedly not
James> much) to alter any property of the right labels and have
James> had no success - How do I alter the right axis label
James> properties in the example below??? thanks for any help.
Hi Jim,
Avoiding for now the question of what the proper interface should be
for accessing the left and right (or top and bottom) tick properties
in general, here's a quick fix that will give you access to all of the
tick labels for a give axis
In matplotlib.axis.py, replace the get_ticklabels method with
def get_ticklabels(self):
'Return a list of Text instances for ticklabels'
labels1 = [tick.label1 for tick in self.get_major_ticks() if tick.label1On]
labels2 = [tick.label2 for tick in self.get_major_ticks() if tick.label2On]
return labels1+labels2
The current behavior was to just return the label1 instances (left for
xaxis, bottom for yaxis).
Perhaps the best solution is to add an optional arg to all the
get_tick* methods
labels = ax.get_xticklabels() # get all
labels = ax.get_xticklabels('left') # get left labels
labels = ax.get_xticklabels('right') # get right labels
and so on for get_xticks, get_xticklines and the y and set* analogs.
JDH
|
|
From: James B. <bo...@ll...> - 2004-08-11 20:22:19
|
In the following code I attempt to plot right and left yaxis labels
each with its own color. The left axis comes out OK - red, medium
The right axis comes out the default.
I have tried everything I could think of (admittedly not much) to alter
any property of the right labels and have had no success -
How do I alter the right axis label properties in the example below???
thanks for any help.
Jim
This is taken from the 'two_scales.py' in the examples directory.
from matplotlib.matlab import *
ax1 = subplot(111)
t = arange(0.0, 10.0, 0.01)
s1 = exp(t)
plot(t, s1, 'b-')
ax1.yaxis.tick_left()
for label in ax1.get_yticklabels():
label.set_fontsize('medium')
label.set_color('r')
# turn off the 2nd axes rectangle with frameon kwarg
ax2 = subplot(111, frameon=False)
s2 = sin(2*pi*t)
plot(t, s2, 'r.')
ax2.yaxis.tick_right()
for label in ax1.get_yticklabels():
label.set_fontsize('medium')
label.set_color('b')
xlabel('time (s)')
|
|
From: Stephen W. <ste...@cs...> - 2004-08-11 19:24:35
|
On Wed, 2004-08-11 at 10:31, Jeffery D. Collins wrote:
> from matplotlib.matlab import ylabel
> =
=20
>=20
> ylabel('bia [cm]')
What does your .matplotlibrc look like? In particular, do you have
interactive set? I had to change the first line above to 'import *' to
get the show() function. If I change my .matplotlibrc file to
backend: TkAgg
interactive: true
I can do as many ylabel's as I like without difficulty. Fedora Core 1,
latest matplotlib CVS.
--=20
Stephen Walton <ste...@cs...>
Dept. of Physics & Astronomy, Cal State Northridge
|
|
From: Paul B. <ba...@st...> - 2004-08-11 19:01:30
|
Darren Dale wrote:
> I was thinking about the way the labels are formatted. Some of the
> numbers I work with are large(10^10) and small (10^-10), and the
> formatting wasnt quite right. I am running the following as a test:
>
> mport matplotlib
> from matplotlib.matlab import *
> from numarray import array
>
> a=array(range(10))*1e6+1e7
> b = array(range(10))*1e-5+1e-4
> plot(a,b)
>
> in ticker.py, in ScalarFormatter, what is the purpose of this routine?
>
> # if the value is just a fraction off an int, use the int
> if abs(x-long(x))<0.0001*d:
> if x<=10000: return '%d' % long(x + 0.5)
> else: return '%1.0e'%long(x)
>
> If commented out, the labels are formatted appropriately as
> exponentials, otherwise, the level of precision can often not be useful.
> Also, in the exponential formatting block, might this
> if d < 1e-3: fmt = '%1.3f'
> read this?:
> if d < 1e-2: fmt = '%1.3e'
>
> One final suggestion, for formatting the exponential component:
>
> m = self._zerorgx.match(s)
> if m:
> s = m.group(1)
> if m.group(2) is not None:
> ## s += m.group(2)
> s += m.group(2)[:2]+str(int(m.group(2)[2:])) ## my hack
> to make 3e003 look like 3e3. (Whats the "right way"?)
> s = s.replace('+', '')
> return s
>
> Darren
This patch has been committed, so exponential values should format correctly.
-- Paul
--
Paul Barrett, PhD Space Telescope Science Institute
Phone: 410-338-4475 ESS/Science Software Branch
FAX: 410-338-4767 Baltimore, MD 21218
|
|
From: John H. <jdh...@ac...> - 2004-08-11 18:56:12
|
>>>>> "Jeffery" == Jeffery D Collins <jef...@ve...> writes:
Jeffery> I am using the latest snapshot from the CVS repository
Jeffery> and am getting a segmentation fault when using ylabel
Jeffery> with certain strings. Below is a code snippet that
Jeffery> crashes on the last occurance of ylabel. Does this crash
Jeffery> for anyone else?
One more thing - there is almost nothing different in CVS than in
0.61.0. Since the CVS mirrors sometimes lag, it would help in
diagnosing this problem if you test with 0.61. I recommend first
removing site-packages/matplotlib and your matplotlib 'build' dir to
get a clean install.
Thanks,
John Hunter
|
|
From: John H. <jdh...@ac...> - 2004-08-11 18:54:24
|
>>>>> "Jeffery" == Jeffery D Collins <jef...@ve...> writes:
Jeffery> I am using the latest snapshot from the CVS repository
Jeffery> and am getting a segmentation fault when using ylabel
Jeffery> with certain strings. Below is a code snippet that
Jeffery> crashes on the last occurance of ylabel. Does this crash
Jeffery> for anyone else?
Jeffery> from matplotlib.matlab import ylabel ylabel('bia [cm]')
Jeffery> raw_input('continue') ylabel('Bia [cm]') # seg fault
Jeffery> raw_input('continue')
Your script is line wrapped in your post, so it is difficult to know
exactly what you mean. The following does not segfault for me
from matplotlib.matlab import ylabel
ylabel('bia [cm]')
raw_input('continue')
ylabel('Bia [cm]') # seg fault
raw_input('continue')
It would be helpful if you narrowed the scope of your problem by using
the Agg backend. My guess is you'll encounter the same problem.
Assuming so, there are two extra things you could do to give more
information
Edit site-packages/matplotlib/backends/backend_agg.py in the function
_get_agg_font, print the font filename you are using. Ie, on or
around line 231 in matplotlib-0.61, add the print line as below
if font is None:
fname = fontManager.findfont(prop)
print 'agg loading', fname
try: font = FT2Font(str(fname))
Additionally, you may want to set at the top of that file
DEBUG = 1
and edit setup.py and set
VERBOSE = True
and recompile matplotlib cleanly. To do this, go to the matplotlib
src dir and 'rm -rf build' before reinstalling matplotlib.
Rerun your tests - be prepared for a deluge of messages.
This should provide some additional helpful information.
You may want to followup to the devel list instead of the users list
Thanks,
John Hunter
Jeffery> More information: OS: Linux (RH9) backend: TkAgg
Jeffery> Python 2.3.2 (#1, Oct 22 2003, 19:27:14) [GCC 3.2.2
Jeffery> 20030222 (Red Hat Linux 3.2.2-5)] on linux2 Type "help",
Jeffery> "copyright", "credits" or "license" for more information.
Jeffery> --
Jeffery> -----------------------------------------------------------------
Jeffery> Jeffery D. Collins, Ph.D. Vexcel Corp. Sr. Engineer
Jeffery> 1690 38th St. Voice: (303)583-0228 Boulder, CO 80301
Jeffery> Fax: (303)583-0246 vexcel.com
Jeffery> -------------------------------------------------------
Jeffery> SF.Net email is sponsored by Shop4tech.com-Lowest price
Jeffery> on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk
Jeffery> Sonic DVD+R for only $33 Save 50% off Retail on Ink &
Jeffery> Toner - Free Shipping and Free Gift.
Jeffery> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
Jeffery> _______________________________________________
Jeffery> Matplotlib-users mailing list
Jeffery> Mat...@li...
Jeffery> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Jeffery D. C. <jef...@ve...> - 2004-08-11 17:31:47
|
I am using the latest snapshot from the CVS repository and am getting a
segmentation fault when using ylabel with certain strings. Below is a
code snippet that crashes on the last occurance of ylabel. Does this
crash for anyone else?
from matplotlib.matlab import ylabel
ylabel('bia [cm]')
raw_input('continue')
ylabel('Bia [cm]') # seg fault
raw_input('continue')
More information:
OS: Linux (RH9)
backend: TkAgg
Python 2.3.2 (#1, Oct 22 2003, 19:27:14)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
--
-----------------------------------------------------------------
Jeffery D. Collins, Ph.D. Vexcel Corp.
Sr. Engineer 1690 38th St.
Voice: (303)583-0228 Boulder, CO 80301
Fax: (303)583-0246 vexcel.com
|