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
(3) |
2
(1) |
3
(3) |
4
(8) |
5
(5) |
6
(1) |
7
(16) |
8
(7) |
9
(29) |
10
(16) |
11
(8) |
12
(8) |
13
(1) |
14
(17) |
15
(15) |
16
(23) |
17
(20) |
18
(25) |
19
(2) |
20
(3) |
21
(12) |
22
(6) |
23
(11) |
24
(6) |
25
(3) |
26
|
27
(2) |
28
(4) |
29
(19) |
30
(5) |
31
(33) |
|
|
Hi, I'd like to have figure with 3 (or 4) plots having different scales but sharing the same x-axis. Basically I want an extension of the twinx command (see, e.g, two_scales.py demo). I'm using 0.91.2svn on MacOSX10.5.1 from http://trichech.us/?page_id=3D5 I've tried the following hack (creating very narrow axes for the 3rd y-axis), which seems to work reasonably well but leads to a thick tick=20 line. As expected pan&zoom doesn't work for all axes. ------------------------------------------------------------------- #!/usr/bin/env python from pylab import * # some functions to plot x=3Dlinspace(0,2*pi,100) y1=3Dsin(x) y2=3D10*cos(x) y3=3D0.5*cos(2*x) # create main axes factor=3D0.9 # how much x-space is used by subaxes am=3Daxes(xticks=3D[]) pos =3D am.get_position() pos[2] =3D factor*pos[2] # frame for subaxes # first plot a1=3Daxes(pos,frameon=3DTrue) p1=3Dplot(x,y1,'b') xlim(min(x),max(x)) xlabel("x") a1.yaxis.tick_left() ylabel("axis 1") # second plot, y-axis on the right side a2=3Daxes(pos,frameon=3DFalse) p2=3Dplot(x,y2,'r') xlim(a1.get_xlim()) a2.yaxis.tick_right() a2.yaxis.set_label_position("right") ylabel("axis 2") # third plot, 2nd y-axis on the right side taken over by main axes a3=3Daxes(pos,frameon=3DFalse,yticks=3D[],xticks=3D[]) p3=3Dplot(x,y3,'g') xlim(min(x),max(x)) # legend for all three plots legend((p1,p2,p3),('plot 1','plot 2','plot 3'),loc=3D0) # now adjust settings for main axes # draw y-axis of third plot axes(am) pos =3D am.get_position() # move to right and make it a line pos[0] +=3D pos[2] pos[2] =3D 0.001 # 0 doesn't work am.set_position(pos) # draw third y-axis ylim(a3.get_ylim()) ylabel("axis 3") am.yaxis.tick_right() am.yaxis.set_label_position("right") show() ------------------------------------------------------------------- However, if I try to extend it to 4 y-axes (2 on each side) I encounter several problems: ------------------------------------------------------------------- #!/usr/bin/env python from pylab import * # some functions to plot x=3Dlinspace(0,2*pi,100) y1=3Dsin(x) y2=3D10*cos(x) y3=3D0.5*cos(2*x) y4=3D2*sin(0.5*x) # create main axes factor=3D0.1 # how much x-space is used by y-axes am=3Daxes(xticks=3D[]) pos =3D am.get_position() # frame for subaxes pos[0] +=3D factor*pos[2] pos[2] =3D (1-2*factor)*pos[2] # frame for subaxes # first plot, 2nd y-axis on the left side taken over by main axes a1=3Daxes(pos,frameon=3DFalse,yticks=3D[],xticks=3D[]) p1=3Dplot(x,y1,'b') xlim(min(x),max(x)) ylim1=3D a1.get_ylim() # bug: save as it is overwritten by plot4 # second plot, axis left a2=3Daxes(pos,frameon=3DTrue) p2=3Dplot(x,y2,'r') xlim(a1.get_xlim()) xlabel("x") a2.yaxis.tick_left() ylabel("axis 2") # third plot, y-axis on the right side a3=3Daxes(pos,frameon=3DFalse) p3=3Dplot(x,y3,'g') xlim(a1.get_xlim()) a3.yaxis.tick_right() a3.yaxis.set_label_position("right") ylabel("axis 3") # fourth plot, 2nd y-axis on the right side taken over by main axes a4=3Daxes(pos,frameon=3DFalse,yticks=3D[],xticks=3D[]) p4=3Dplot(x,y4,'m') xlim(a1.get_xlim()) ylim4 =3D a4.get_ylim() # legend for all three plots legend((p1,p2,p3,p4),('plot 1','plot 2','plot 3','plot 4')) # now adjust settings for main axes # draw y-axis of third plot axes(am) pos =3D am.get_position() pos2 =3D array(pos) pos[2] =3D 0.001 am.set_position(pos) # draw third y-axis am.set_ylim(ylim1) a1.set_ylim(ylim1) am.add_artist(a1) ylabel("axis 1") am.yaxis.tick_left() am.yaxis.set_label_position("left") # now adjust settings for main axes # draw y-axis of fourth plot # move to right and make it a line pos2[0] +=3D pos2[2] pos2[2] =3D 0.001 am2 =3D axes(pos2,xticks=3D[]) # draw fourth y-axis am2.set_ylim(ylim4) a4.set_ylim(ylim4) am2.add_artist(a4) ylabel("axis 4") am2.yaxis.tick_right() am2.yaxis.set_label_position("right") show() ------------------------------------------------------------------- The 4th plot overwrites the ylim of the 1st plot (bug?). Is there a limit of 3 axes per figure? The ylim of plot4 is still ignored. Why do I have to add the axes a1 and a4 the main axes to make them visibl= e? Any ideas? cheers, --=20 Thomas Tanner ---------------- email: ta...@tu... phone: (+49) 7071 601 608 GnuPG key id: 1024/5924D4DD Max Planck Institute for Biological Cybernetics Spemannstrasse 38 72076 T=FCbingen, Germany
I've been trying to use the STIXGeneral font that comes with matplotlib (my version is 0.91.1). It's rendered ok on the screen, however, when saving the fig as an eps file my postscript processor (ghostscript) can't read the font information included in the eps file (ps.fonttype 42 in config file). I wonder if it's a bug in the conversion to ttf, that has been applied to the STIX font. Saving to pdf format works, but the ticklabels are not rendered correctly, there's too much space between the glyphs and they are overlapping with the axes. The title looks good, though. Thanks for help! Bernhard
Alan G Isaac wrote: > On 2008年1月28日, Manuel Metz apparently wrote: >> fig = pylab.figure(figsize=(6,10), dpi=96) >> [...] >> pylab.savefig("filename.eps", dpi=96) > > A couple questions. > > 1. The help for figure says that the dpi argument > determines the "resolution". Suppose I am producing > a PNG file for screen display: what am I changing > when I change the dpi argument (from the point of > view of the file, and from the point of viewer of > the person viewing the file onscreen). More generally, > are there standard setting recommended for onscreen > PNG figure display? For screen display, whether in interactive mode or when displaying a png file, if you use a dpi value that matches the actual dpi of your screen, then when you specify figsize in inches, your figure will actually appear that size, fonts will be the right size, etc. If you use too small a dpi value, the figure will be smaller than it should. Screens vary. The screen on my laptop has about 130 dpi. Desktop flat panels will usually have a smaller value than that. For example, an old "15-inch" flat panel with 1024/768 pixels is actually about 12 inches wide, so dpi=85. The mpl default 'figure.dpi' of 80 is low; I doubt many modern screens come close to that. If I were recommending a default, I would probably pick 100 or 110 as a middle-of-the-road match to the range of modern screens, but I have not looked into it carefully. > > 2. EPS is a vector format, and the fig has a size. > What role does the dpi argument play here? Some information, such as images, must be encoded as pixels. The dpi value in this case determines the resolution of an image, not the physical size in inches. Using a large value will yield better resolution at the cost of a larger file and slower rendering. Eric
Alan: The figure size determines the eventual size of the figure where it will be displayed. You should set that with "figsize=(x,y)" before you actually plot. Then, and very importantly, you should set the DPI for the medium where you are viewing the figure. A computer display will probably be between 75 and 100 DPI. Then for good print quality, you should specify a DPI larger than that, say 300 or 350 or for some purists even to 800 when you use "savefig(...)". Then the actual number of pixels is determined which will give the original figure size on the chosen display medium. Note that more DPI means more pixels and a larger file. This didn't work for me with an earlier version of mpl and after I posted that here, it was fixed so you should be using the latest version for the above to work. HTH and cheers, Wayne Alan G Isaac wrote: > On 2008年1月28日, Manuel Metz apparently wrote: > >> fig = pylab.figure(figsize=(6,10), dpi=96) >> [...] >> pylab.savefig("filename.eps", dpi=96) >> > > A couple questions. > > 1. The help for figure says that the dpi argument > determines the "resolution". Suppose I am producing > a PNG file for screen display: what am I changing > when I change the dpi argument (from the point of > view of the file, and from the point of viewer of > the person viewing the file onscreen). More generally, > are there standard setting recommended for onscreen > PNG figure display? > > 2. EPS is a vector format, and the fig has a size. > What role does the dpi argument play here? > > Thank you, > Alan Isaac > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
On 2008年1月28日, Manuel Metz apparently wrote: > fig = pylab.figure(figsize=(6,10), dpi=96) > [...] > pylab.savefig("filename.eps", dpi=96) A couple questions. 1. The help for figure says that the dpi argument determines the "resolution". Suppose I am producing a PNG file for screen display: what am I changing when I change the dpi argument (from the point of view of the file, and from the point of viewer of the person viewing the file onscreen). More generally, are there standard setting recommended for onscreen PNG figure display? 2. EPS is a vector format, and the fig has a size. What role does the dpi argument play here? Thank you, Alan Isaac
On 2008年1月29日, Michael Biester apparently wrote: > unknown software exception Did you get a response on this? (Sorry if I missed it.) I see no problem on a similar setup with a slightly older Matplotlib (0.90.1). Cheers, Alan Isaac
I am new to matplotlib and I am really impressed. I have a problem though. I am not able to get a lower origin in matshow, imshow gives the origin at bottom when I say origin='lower' for example #!/usr/bin/env python from matplotlib.pylab import * matshow(rand(64,64),fignum=100,cmap=cm.gray,origin="lower") show() will still give me origin on the top, but I want a lower one. what do i need to do? Thanks, Abhi
On Jan 30, 2008 4:41 AM, Bernhard Voigt <Ber...@de...> wrote: > Hi, > > I was using something like this: > > f = pylab.figure() > f.text(.4, .95, 'My Title') # coordinates are window coordinates from 0 to 1 > pylab.subplot(421) if you do >>> f.text(.5, .95, 'My Title', horizontalalignment='center') you will get centering for free and won't have to do the .4 hack JDH
Hi, I was using something like this: f = pylab.figure() f.text(.4, .95, 'My Title') # coordinates are window coordinates from 0 to 1 pylab.subplot(421) ... This could be made more robust by checking the extend and location of the subplots and length of the title... Cheers! Bernhard On 1/24/08, Tommy Grav <tg...@ma...> wrote: > I have a plot that is divided into four subplots. > > pylab.figure() > pylab.subplot(221) > pylab.plot(a,b,"k-") > pylab.subplot(222) > pylab.plot(a,b,"k-") > pylab.subplot(223) > pylab.plot(a,b,"k-") > pylab.subplot(224) > pylab.plot(a,b,"k-") > > I would like to add a title to the entire plot, but pylab.title() only > applies to the most recent subplot. I have tried > > pylab.figure() > pylab.subplot(111) > pylab.title("Title Here") > pylab.subplot(221) > pylab.plot(a,b,"k-") > pylab.subplot(222) > pylab.plot(a,b,"k-") > pylab.subplot(223) > pylab.plot(a,b,"k-") > pylab.subplot(224) > pylab.plot(a,b,"k-") > > but this does not work as I do not create a plot for > the subplot(111) instance. Is there some way of getting > the type of title I want easily? > > Cheers > Tommy > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
I have functions which plot multiple items to an axis. Often, I have the function explicitly turn interactive mode off and then I turn it back on to what it was before my function was called. At the end of my function, I call draw_if_interactive(). Suppose the user had interactive mode on prior to the function call. The problem I am having is that draw_if_interactive() seems to have no effect---no figure is drawn unless the user makes a subsequent call to show(). Is there a way around this?
Daehyok Shin wrote: > Thanks for your help. > I didn't know set_ylim can the reversed limits. I am wondering if it > is not a good idea to introduce a method such as axis.set_direction(). > Or, axis.set_origin(). > There are Axes methods invert_xaxis() and invert_yaxis() in recent versions of mpl; I don't remember who added them or when. Eric
Thanks for your help. I didn't know set_ylim can the reversed limits. I am wondering if it is not a good idea to introduce a method such as axis.set_direction(). Or, axis.set_origin(). Daehyok Shin On Jan 29, 2008 5:16 PM, Eric Firing <ef...@ha...> wrote: > In [1]:plot(arange(10)) > Out[1]:[<matplotlib.lines.Line2D object at 0x908ee0c>] > > In [2]:ax = gca() > > In [3]:ax.set_ylim(ax.get_ylim()[::-1]) > Out[3]:(9.0, 0.0) > > In [4]:draw() > > In [5]: > > > The method in line 3 should work on new and old versions of matplotlib. > The basic idea is that when axis limits are set, you specify the bottom, > then the top (or the right, then the left), not min and then max. > > Eric > > > Daehyok Shin wrote: > > I like to reverse the direction of y axis - from top to bottom. > > Anyone to help me? > > I initially thought it may be easy, but it turned out much harder to > > find THE SOLUTION. > > Thanks. > > > > Daehyok Shin > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Daehyok Shin, PhD Geography Department University of North Carolina-Chapel Hill USA
On Jan 29, 2008 4:13 PM, Tim Michelsen <tim...@gm...> wrote: > In [1]: import timeseries as TS > > In [2]: whos > --------------------------------------------------------------------------- > <type 'exceptions.AttributeError'> Traceback (most recent call last) > > /var/tmp/install/qgislite_trunk/<ipython console> in <module>() > > /var/lib/python-support/python2.5/IPython/iplib.py in ipmagic(self, arg_s) > 962 else: > 963 magic_args = self.var_expand(magic_args,1) > --> 964 return fn(magic_args) > 965 > 966 def ipalias(self,arg_s): > > /var/lib/python-support/python2.5/IPython/Magic.py in magic_whos(self, > parameter_s) > 989 array_type = None > 990 else: > --> 991 array_type = Numeric.ArrayType.__name__ > 992 > 993 # Find all variable names and types so we can figure > out column sizes > > <type 'exceptions.AttributeError'>: 'module' object has no attribute > 'ArrayType' > > maybe some of the IPython power users can give me a hint why this > happes. [1] Very strange. I can't reproduce it here (on gutsy, but running ipython from my own tree). What's odd is this: In [1]: import Numeric In [2]: print Numeric.ArrayType <type 'array'> So Numeric *most definitely* has an ArrayType member. Try doing the same as I did, also showing us whether you started ipython with -pylab or not. There may be something odd about your Numeric installation. Also do this: In [3]: Numeric? Type: module Base Class: <type 'module'> Namespace: Interactive File: /usr/lib/python2.5/site-packages/Numeric/Numeric.py [etc] It's possible that you have in your path a file called Numeric.py which is not the 'real' Numeric module. This would explain your problem and why nobody else sees it. Cheers, f
Hello! > Hmm, I did reinstall and still no joy, it insists on install python2.4 > at the same time! do a $: sudo apt-get --purge remove matplotlib ipython to really remove the configuration files. then $: sudo apt-get install matplotlib ipython check if pylab is on your system: $: locate pylab Here are the contents of pylab: from matplotlib.pylab import * so you may just test this in a python shell: $ python Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from matplotlib.pylab import * >>> then do the same from within ipython as I'd shown in my previous mail. I hope that this helps you to narrow it down. I have also some troubles with ipython that is currently in Gutsy: ipython Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) Type "copyright", "credits" or "license" for more information. IPython 0.8.1 -- 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]: import timeseries as TS In [2]: whos --------------------------------------------------------------------------- <type 'exceptions.AttributeError'> Traceback (most recent call last) /var/tmp/install/qgislite_trunk/<ipython console> in <module>() /var/lib/python-support/python2.5/IPython/iplib.py in ipmagic(self, arg_s) 962 else: 963 magic_args = self.var_expand(magic_args,1) --> 964 return fn(magic_args) 965 966 def ipalias(self,arg_s): /var/lib/python-support/python2.5/IPython/Magic.py in magic_whos(self, parameter_s) 989 array_type = None 990 else: --> 991 array_type = Numeric.ArrayType.__name__ 992 993 # Find all variable names and types so we can figure out column sizes <type 'exceptions.AttributeError'>: 'module' object has no attribute 'ArrayType' maybe some of the IPython power users can give me a hint why this happes. [1] I have already filed a bug report to Ubuntu but are not able to explain more: magic function whos not working in ipython https://bugs.launchpad.net/ubuntu/+source/ipython/+bug/177253 Kind regards, Timmie [1] Thats Why I crosspost to ipython-user. Inital post was: http://permalink.gmane.org/gmane.comp.python.matplotlib.general/11463
In [1]:plot(arange(10)) Out[1]:[<matplotlib.lines.Line2D object at 0x908ee0c>] In [2]:ax = gca() In [3]:ax.set_ylim(ax.get_ylim()[::-1]) Out[3]:(9.0, 0.0) In [4]:draw() In [5]: The method in line 3 should work on new and old versions of matplotlib. The basic idea is that when axis limits are set, you specify the bottom, then the top (or the right, then the left), not min and then max. Eric Daehyok Shin wrote: > I like to reverse the direction of y axis - from top to bottom. > Anyone to help me? > I initially thought it may be easy, but it turned out much harder to > find THE SOLUTION. > Thanks. > > Daehyok Shin > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
I like to reverse the direction of y axis - from top to bottom. Anyone to help me? I initially thought it may be easy, but it turned out much harder to find THE SOLUTION. Thanks. Daehyok Shin
Hi, I use matplotlib frequenctly on Python 2.4.x. . Recently changed to Python 2.5.1 (upgraded to numpy 1.0.4, matplotlib 0.91.2, scipy 0.6). The Tkinter graphics does not work anymore. I tried the code snippet below and got a blank window and message box: python.exe unknown software exception. I use Windows XP SP2. Any comments on this are very much appreciated. Best regards Michael ---------------------------------- import pylab as py import numpy as num t = num.arange(0.0, 2.0, 0.01) s = num.sin(2*num.pi*t) py.figure() py.plot(t, s, linewidth=1.0) py.xlabel('time (s)') py.ylabel('voltage (mV)') py.title('About as simple as it gets, folks') py.grid(True) py.show() --------------------------
The axes3d stuff is not currently working on the SVN trunk. You probably want to use 0.91.2 or the v0_91_maint branch in SVN instead. Cheers, Mike Johann Cohen-Tanugi wrote: > hello, > thanks for answering. I actually fail with the import : > In [1]: from matplotlib import axes3d > --------------------------------------------------------------------------- > ImportError Traceback (most recent call last) > > /home/cohen/bstw/<ipython console> in <module>() > > /usr/lib/python2.5/site-packages/matplotlib/axes3d.py in <module>() > 14 from axes import Axes > 15 import cbook > ---> 16 from transforms import unit_bbox > 17 > 18 import numpy as npy > > ImportError: cannot import name unit_bbox > > any idea? > >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: 2008年1月27日 22:18:00 +0000 >> From: "Neil Crighton" <nei...@gm...> >> Subject: Re: [Matplotlib-users] plotting a series of 3D points and >> picker=True and 3D >> To: mat...@li... >> Message-ID: >> <637...@ma...> >> Content-Type: text/plain; charset=ISO-8859-1 >> >> I think scatter3D does what you want: >> >> from matplotlib import axes3d >> import pylab as pl >> fig = pl.figure() >> ax = axes3d.Axes3D(fig) >> ax.scatter3D(data[:,0],data[:,1],data[:,2]) >> ax.set_xlabel('X value') >> ax.set_ylabel('Y value') >> ax.set_zlabel('Z value') >> pl.show() >> >> You could also change the colour and size of each point based on other >> array values: >> >> col = ax.scatter3D(data[:,0], data[:,1], data[:,2], c=data[:,3], >> cmap=pl.cm.jet, s=data[:,4]) >> cbar = fig.colorbar(col,shrink=0.9,extend='both') >> cbar.ax.set_ylabel('axis 3 data values') >> >> Pretty nifty. >> >> Neil >> >> >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
hello, thanks for answering. I actually fail with the import : In [1]: from matplotlib import axes3d --------------------------------------------------------------------------- ImportError Traceback (most recent call last) /home/cohen/bstw/<ipython console> in <module>() /usr/lib/python2.5/site-packages/matplotlib/axes3d.py in <module>() 14 from axes import Axes 15 import cbook ---> 16 from transforms import unit_bbox 17 18 import numpy as npy ImportError: cannot import name unit_bbox any idea? > ---------------------------------------------------------------------- > > Message: 1 > Date: 2008年1月27日 22:18:00 +0000 > From: "Neil Crighton" <nei...@gm...> > Subject: Re: [Matplotlib-users] plotting a series of 3D points and > picker=True and 3D > To: mat...@li... > Message-ID: > <637...@ma...> > Content-Type: text/plain; charset=ISO-8859-1 > > I think scatter3D does what you want: > > from matplotlib import axes3d > import pylab as pl > fig = pl.figure() > ax = axes3d.Axes3D(fig) > ax.scatter3D(data[:,0],data[:,1],data[:,2]) > ax.set_xlabel('X value') > ax.set_ylabel('Y value') > ax.set_zlabel('Z value') > pl.show() > > You could also change the colour and size of each point based on other > array values: > > col = ax.scatter3D(data[:,0], data[:,1], data[:,2], c=data[:,3], > cmap=pl.cm.jet, s=data[:,4]) > cbar = fig.colorbar(col,shrink=0.9,extend='both') > cbar.ax.set_ylabel('axis 3 data values') > > Pretty nifty. > > Neil > > >
You shouldn't ever find a setup.py file in a binary distribution. It is there for building purposes, hence should be with the source distributions. - Charlie On Tue, Jan 29, 2008 at 10:47 AM, Jeff Younker <je...@dr...> wrote: > I'm running on OSX 10.5. > > The installation process for me was the following two commands: > $ easy_install matplotlib > $ easy_install numpy > > That's it. You don't need to manually download the egg. You don't > need to root around in the egg. Just run easy_install. It retrieves > the > egg and installs it in the correct location. > > - Jeff Younker - je...@dr... - > > > > > On Jan 28, 2008, at 9:29 PM, Michael Barton wrote: > > > I wanted to test MatPlotLib for use in a GIS system for which I help > > develop the GUI in wxPython. I'm working on a Mac Intel OSX 10.4.11 > > system. > > > > The installation instructions for OS X are very sketchy and there is > > no readme in the binary. But AFAICT, there ought to be a setup.py > > file in the fat egg distribution folder. However, there is no such > > beast. There is only pylab.py and that isn't a distribution build > > utility. > > > > Since I'm not a member of the list, I'd appreciate it if someone > > could email me directly. > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Hi, I would like to annotate a bunch of points on a map. I'm trying to use the annotate function, but it need to know the text coordinates. So you have to configure manually in order not to have these annotations overlap each other. This is really annoying. Is there a way to : - detect the "best" position for theses annotation as with loc="best" argument of the legend function ? - let me move theses annotations with the mouse ? I've heard that matplotlib gives the possibility of using events and signals. Can this be used in this situation ? Is there any example for this ? Regards, -- BL
On Jan 29, 2008 9:46 AM, Slackenerny <sla...@pu...> wrote: > Hey, > I'm currently plotting a dataset as x,y-scatter or a set of x values, > and I would like to know if there is a simple way to highlight a when I want to highlight a single point, I frequently use something like the following trick: x, y = np.random.rand(2, 30) plot(x, y, 'o', ms=6, mfc='blue') ind = 10 # highlight the 10th point plot([x[ind]], [y[ind]], 'o', ms=15, mfc='yellow', alpha=0.4) > Additional information: there is a second window with changing chemical > structures, and I would like to have the energy that is connected to > the structure shown at that very moment to be highlighted... You should be able to connect events in one window with line properties in the other to accomplish this -- let us know if you need any help with this. JDH
Hey, I'm currently plotting a dataset as x,y-scatter or a set of x values, and I would like to know if there is a simple way to highlight a single point? Additional information: there is a second window with changing chemical structures, and I would like to have the energy that is connected to the structure shown at that very moment to be highlighted... best wishes
I'm running on OSX 10.5. The installation process for me was the following two commands: $ easy_install matplotlib $ easy_install numpy That's it. You don't need to manually download the egg. You don't need to root around in the egg. Just run easy_install. It retrieves the egg and installs it in the correct location. - Jeff Younker - je...@dr... - On Jan 28, 2008, at 9:29 PM, Michael Barton wrote: > I wanted to test MatPlotLib for use in a GIS system for which I help > develop the GUI in wxPython. I'm working on a Mac Intel OSX 10.4.11 > system. > > The installation instructions for OS X are very sketchy and there is > no readme in the binary. But AFAICT, there ought to be a setup.py > file in the fat egg distribution folder. However, there is no such > beast. There is only pylab.py and that isn't a distribution build > utility. > > Since I'm not a member of the list, I'd appreciate it if someone > could email me directly. >
John Hunter wrote: > On Jan 29, 2008 8:33 AM, Robert Cimrman <cim...@nt...> wrote: >> Is there a way of simultaneously setting both xdata and ydata of a line? >> I need to animate a line with varying number of points in each frame. > > line.set_data(xdata, ydata) > > is what you are looking for Great! I did not see that one. r.