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
(9) |
2
(6) |
3
(8) |
4
(6) |
5
|
6
(1) |
7
(4) |
8
(15) |
9
(11) |
10
|
11
(1) |
12
(13) |
13
(5) |
14
(10) |
15
(12) |
16
(7) |
17
(12) |
18
(5) |
19
(4) |
20
(11) |
21
(4) |
22
(11) |
23
(28) |
24
(24) |
25
(23) |
26
(6) |
27
(7) |
28
(17) |
29
(21) |
30
(6) |
|
|
|
Nathanael, I don't use windows, but on linux I have to load matplotlib first and after type show() from pylab import * plot([1,2,3]) show() have you done it? Alexandre 2008年4月8日, Nathanael Berestycki <nbe...@gm...>: > > Hi all, > > I am trying to setup matplotbib on my computer (which is unfortunately > running on windows) and for some reason, it doesn't seem to be working. I > believe I have downloaded everything I should have downloaded (Python 2.5, > numpy, ipython, lpng1226, zlib, gtk, and I'm probably forgetting a few other > things that I did download), yet when I open Ipython and plot the > recommended example > > plot([1,2,3]) > > all I get is the error "NameError: name 'plot' is not defined". > Possibly, the things I downloaded did not go to the right directories. > Does anybody know if this matters, and if yes, where should the files be > located? Part of the problem also is that my computer skills are low, so I > don't understand many of the terms used (such as "backends", for instance - > what is it?). > > I would really appreciate it if somebody could tell me what I should try > to do or point me to a step-by-step guide ! (I would really, really love to > be able to plot data I generate on Python...) > > Many thanks in advance for your help, > Nathanael > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save 100ドル. > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Perhaps I misunderstand the question. How is this question specific to matplotlib and not remote login in general? If you need an SSH client for Windows, I use putty, and it works pretty well. If you need X11 remoting or something, I've used Cygwin, and I know others have had success with X-Ming. Does that answer your question? Mike sa6113 wrote: > No one to help me ?? > > > sa6113 wrote: > >> what options we have for performing ssh (actually scp) on Windows and >> Linux from Python. >> Note that Linux has builtin ssh/scp, hence, pexpect should be a simple >> option, but to the best >> of my knowledge Windows does not anything. I would like to see a list of >> options on this. >> >> Would you please help me ? >> >> >> > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
No one to help me ?? sa6113 wrote: > > what options we have for performing ssh (actually scp) on Windows and > Linux from Python. > Note that Linux has builtin ssh/scp, hence, pexpect should be a simple > option, but to the best > of my knowledge Windows does not anything. I would like to see a list of > options on this. > > Would you please help me ? > > -- View this message in context: http://www.nabble.com/ssh-options-tp16646647p16671478.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Yea, I've been using 4.0 compilers along with the Apple installation of Python. I'll try out your suggestions. -gideon On Apr 13, 2008, at 8:41 PM, Joshua Lippai wrote: > I know I had some matplotlib trouble in terms of compiling on OS X > Leopard before I changed the Makefile inside > > /Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/ > config/ > > If you're on an Intel Mac, try downloading the beta Apple GCC 4.2 from > http://developer.apple.com and alter the Makefile so that CC and CXX > are set to /usr/bin/gcc-4.2 and /usr/bin/g++-4.2 respectively. Also > remove the flag "-arch ppc" from both the BASEFLAGS and LDFLAGS > sections, and remove "-Wno-long-double" flag from the BASEFLAGS > section. > > This assumes you're using the MacPython installation of Python and not > the standard one provided by Apple. I personally wouldn't recommend > using the standard Apple installation because a lot of modules assume > you have the Python Framework in /Library/Frameworks/ due to that > being the de facto standard set by MacPython and ActiveState Python. > In addition, the MacPython instalation provides Python 2.5.2, not just > 2.5.1. > > Matplotlib aside, you might want to make sure you installed the > Unicode version of wxWidgets, and reinstall it if necessary. > > Josh > > On Sun, Apr 13, 2008 at 3:12 PM, Gideon Simpson > <gr...@co...> wrote: >> I don't see any error when I run python setup.py build for >> matplotlib. It >> seems to identify everything it needs. >> -gideon >> >> >> >> On Apr 13, 2008, at 10:35 AM, Joshua Lippai wrote: >> >> >>> Are you sure you built pylab correctly? See if you can find >>> something >>> suspicious in the build dialog. I had this error once a long time >>> ago, >>> but at some point since then a rebuild of everything fixed it. In >>> the >>> mean time, using savefig will still work even if the GUI button >>> doesn't. >>> >>> Josh >>> >>> On Sat, Apr 12, 2008 at 11:41 AM, Gideon Simpson <gr...@co... >>> > >> wrote: >>> >>>> For some reason when trying to save in PNG format on OS X >>>> 10.5.2, a >>>> window pops up with the error: >>>> >>>> Matplotlib backend_wx error >>>> cannot return std::string from Unicode object >>>> >>>> >>>> This is with the simple scipy demo at >> http://www.scipy.org/Cookbook/OptimizationDemo1 >>>> >>>> >>>> Gideon Simpson >>>> Department of Applied Physics & Applied Mathematics >>>> Columbia University >>>> gr...@co... >>>> >>>> >>>> >> ------------------------------------------------------------------------- >>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >>>> Don't miss this year's exciting event. There's still time to save >>>> 100ドル. >>>> Use priority code J8TL2D2. >>>> >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >>>> >>> >> >>
wxPython, rather. Josh On Sun, Apr 13, 2008 at 5:41 PM, Joshua Lippai <dis...@gm...> wrote: > I know I had some matplotlib trouble in terms of compiling on OS X > Leopard before I changed the Makefile inside > > /Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/config/ > > If you're on an Intel Mac, try downloading the beta Apple GCC 4.2 from > http://developer.apple.com and alter the Makefile so that CC and CXX > are set to /usr/bin/gcc-4.2 and /usr/bin/g++-4.2 respectively. Also > remove the flag "-arch ppc" from both the BASEFLAGS and LDFLAGS > sections, and remove "-Wno-long-double" flag from the BASEFLAGS > section. > > This assumes you're using the MacPython installation of Python and not > the standard one provided by Apple. I personally wouldn't recommend > using the standard Apple installation because a lot of modules assume > you have the Python Framework in /Library/Frameworks/ due to that > being the de facto standard set by MacPython and ActiveState Python. > In addition, the MacPython instalation provides Python 2.5.2, not just > 2.5.1. > > Matplotlib aside, you might want to make sure you installed the > Unicode version of wxWidgets, and reinstall it if necessary. > > Josh > > > > On Sun, Apr 13, 2008 at 3:12 PM, Gideon Simpson <gr...@co...> wrote: > > I don't see any error when I run python setup.py build for matplotlib. It > > seems to identify everything it needs. > > -gideon > > > > > > > > On Apr 13, 2008, at 10:35 AM, Joshua Lippai wrote: > > > > > > > Are you sure you built pylab correctly? See if you can find something > > > suspicious in the build dialog. I had this error once a long time ago, > > > but at some point since then a rebuild of everything fixed it. In the > > > mean time, using savefig will still work even if the GUI button > > > doesn't. > > > > > > Josh > > > > > > On Sat, Apr 12, 2008 at 11:41 AM, Gideon Simpson <gr...@co...> > > wrote: > > > > > > > For some reason when trying to save in PNG format on OS X 10.5.2, a > > > > window pops up with the error: > > > > > > > > Matplotlib backend_wx error > > > > cannot return std::string from Unicode object > > > > > > > > > > > > This is with the simple scipy demo at > > http://www.scipy.org/Cookbook/OptimizationDemo1 > > > > > > > > > > > > Gideon Simpson > > > > Department of Applied Physics & Applied Mathematics > > > > Columbia University > > > > gr...@co... > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > > > Don't miss this year's exciting event. There's still time to save 100ドル. > > > > Use priority code J8TL2D2. > > > > > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > > > > _______________________________________________ > > > > Matplotlib-users mailing list > > > > Mat...@li... > > > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > > > > > > > > >
I know I had some matplotlib trouble in terms of compiling on OS X Leopard before I changed the Makefile inside /Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/config/ If you're on an Intel Mac, try downloading the beta Apple GCC 4.2 from http://developer.apple.com and alter the Makefile so that CC and CXX are set to /usr/bin/gcc-4.2 and /usr/bin/g++-4.2 respectively. Also remove the flag "-arch ppc" from both the BASEFLAGS and LDFLAGS sections, and remove "-Wno-long-double" flag from the BASEFLAGS section. This assumes you're using the MacPython installation of Python and not the standard one provided by Apple. I personally wouldn't recommend using the standard Apple installation because a lot of modules assume you have the Python Framework in /Library/Frameworks/ due to that being the de facto standard set by MacPython and ActiveState Python. In addition, the MacPython instalation provides Python 2.5.2, not just 2.5.1. Matplotlib aside, you might want to make sure you installed the Unicode version of wxWidgets, and reinstall it if necessary. Josh On Sun, Apr 13, 2008 at 3:12 PM, Gideon Simpson <gr...@co...> wrote: > I don't see any error when I run python setup.py build for matplotlib. It > seems to identify everything it needs. > -gideon > > > > On Apr 13, 2008, at 10:35 AM, Joshua Lippai wrote: > > > > Are you sure you built pylab correctly? See if you can find something > > suspicious in the build dialog. I had this error once a long time ago, > > but at some point since then a rebuild of everything fixed it. In the > > mean time, using savefig will still work even if the GUI button > > doesn't. > > > > Josh > > > > On Sat, Apr 12, 2008 at 11:41 AM, Gideon Simpson <gr...@co...> > wrote: > > > > > For some reason when trying to save in PNG format on OS X 10.5.2, a > > > window pops up with the error: > > > > > > Matplotlib backend_wx error > > > cannot return std::string from Unicode object > > > > > > > > > This is with the simple scipy demo at > http://www.scipy.org/Cookbook/OptimizationDemo1 > > > > > > > > > Gideon Simpson > > > Department of Applied Physics & Applied Mathematics > > > Columbia University > > > gr...@co... > > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > > Don't miss this year's exciting event. There's still time to save 100ドル. > > > Use priority code J8TL2D2. > > > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > > > _______________________________________________ > > > Matplotlib-users mailing list > > > Mat...@li... > > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > > >
I don't see any error when I run python setup.py build for matplotlib. It seems to identify everything it needs. -gideon On Apr 13, 2008, at 10:35 AM, Joshua Lippai wrote: > Are you sure you built pylab correctly? See if you can find something > suspicious in the build dialog. I had this error once a long time ago, > but at some point since then a rebuild of everything fixed it. In the > mean time, using savefig will still work even if the GUI button > doesn't. > > Josh > > On Sat, Apr 12, 2008 at 11:41 AM, Gideon Simpson > <gr...@co...> wrote: >> For some reason when trying to save in PNG format on OS X 10.5.2, a >> window pops up with the error: >> >> Matplotlib backend_wx error >> cannot return std::string from Unicode object >> >> >> This is with the simple scipy demo at http://www.scipy.org/Cookbook/OptimizationDemo1 >> >> >> Gideon Simpson >> Department of Applied Physics & Applied Mathematics >> Columbia University >> gr...@co... >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to save >> 100ドル. >> Use priority code J8TL2D2. >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>
Are you sure you built pylab correctly? See if you can find something suspicious in the build dialog. I had this error once a long time ago, but at some point since then a rebuild of everything fixed it. In the mean time, using savefig will still work even if the GUI button doesn't. Josh On Sat, Apr 12, 2008 at 11:41 AM, Gideon Simpson <gr...@co...> wrote: > For some reason when trying to save in PNG format on OS X 10.5.2, a > window pops up with the error: > > Matplotlib backend_wx error > cannot return std::string from Unicode object > > > This is with the simple scipy demo at http://www.scipy.org/Cookbook/OptimizationDemo1 > > > Gideon Simpson > Department of Applied Physics & Applied Mathematics > Columbia University > gr...@co... > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save 100ドル. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
I just use blit on imshow map, and work properly. Maybe the following code will help you. def ontimer() canvas.restore_region(background) im.set_array(Z) ax.draw_artist(self.imList[i]) canvas.blit(ax.bbox) canvas.gui_repaint() -- View this message in context: http://www.nabble.com/speeding-up-imshow-tp16623430p16656693.html Sent from the matplotlib - users mailing list archive at Nabble.com.
I just want to set ["10%","20%"....] on colorbar. However, failed again and again. Thank you for your help. The following code work properly. But when I set formatter = FixedFormatter(["10%","20%","30%","40%"]) No labels is shown on colorbar, Why? Is there any way to set the char "%" on colorbar? from matplotlib.ticker import MultipleLocator, FixedFormatter,FormatStrFormatter from pylab import * import matplotlib.colors as colors delta = 0.025 x = y = arange(-3.0, 3.0, delta) X, Y = meshgrid(x, y) Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) Z = 10 * (Z2-Z1) im = imshow(Z, interpolation='bilinear', norm = colors.Normalize(vmin = -1.0, vmax = 1.0, clip = False), origin='lower', extent=[-3,3,-3,3]) locator=MultipleLocator(0.4) #formatter = FixedFormatter(["10%","20%","30%","40%"]) formatter=FormatStrFormatter("%0.1f") colorbar(im, extend='both', shrink=0.8,format=formatter,ticks=locator) show() -- View this message in context: http://www.nabble.com/formatter-on-colorbar-----tp16656691p16656691.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Hello: I am having some trouble with the syntax for plotting using matplotlib. I have appended a simple script which illustrates the problem. When I run the script the first plot command gives the expected results but the second, third and fourth plot commands do not. The second window does open but no plots are contained within. However if I read the script again (run ....) but do not call the function (main()) then the plots for the second window appear (but the plot in the first window does not get the second plot). Any help? #!/usr/bin/env ipython from __future__ import division import numpy as np import scipy as sp #import matplotlib.pyplot as plt import matplotlib.pylab as plt def main(): a = np.array([1,2,3]) b = np.array(([100,200,300],[400,500,600],[700,800,900])) fig1 = plt.figure(1) ax1 = fig1.add_subplot(111) ax1.plot(a) ax1.set_xlabel('x') ax1.set_ylabel('y') ax2 = plt.twinx() ax2.plot(b[:,:]) ax2.set_ylabel('x') ax2.yaxis.tick_right() fig2 = plt.figure(2) ax3 = fig2.add_subplot(211) ax3.plot(a) ax3.set_xlabel('x') ax3.set_ylabel('y') ax4 = fig2.add_subplot(212) ax4.plot(b[1,:]) ax4.set_xlabel('x') ax4.set_ylabel('y') plt.show() return
In reference to: http://news.gmane.org/find-root.php?message_id=%3cc7009a550804100055g6388b20ej520e85d8e679a55%40mail.gmail.com%3e A point was brought up that deserves wider dissemination and a correction, hence my posting to two lists. To reduce confusion among new users and to improve code readability, participants in a numpy sprint, including John D. Hunter (remotely), agreed to promote the following standard: import numpy as np import scipy as sp import matplotlib.pyplot as plt This differs from the message referenced above in that the standard entrance point for the plotting functionality of pylab is the pyplot module of matplotlib, not the pylab module. Pyplot is a fairly recent addition that provides the state-machine plotting interface; pylab is essentially the result of dumping pyplot and numpy into a single namespace, which is sometimes convenient for interactive use but certainly is not encouraged for programming. The recommended standard is intended to promote consistency and readability in the numpy, scipy, and matplotlib families of modules, and in their documentation; it is not intended to imply any restriction on the user's freedom. The recommendation may be helpful in your own code, or it may not; use it where it helps. This message is intended to be informational; it is not a trial balloon, and it is not intended to stimulate discussion. I hope the related discussions that have already occurred on the numpy and matplotlib lists will suffice. Eric
Alan G Isaac wrote: > On 2008年4月11日, Eric Firing apparently wrote: >> It sounds like what you want is a listed colormap with direct indexing >> using a NoNorm() instance as the norm: > >> cmap = mpl.colors.ListedColormap(['k', 'r', 'b']) >> norm = mpl.colors.NoNorm() >> matshow(aa, cmap=cmap, norm=norm, interpolation='nearest') > > Perfect! > > I actually had found ListedColormap in the docs. > It's name was very promising but the __init__ function had > no help. Can I suggest adding at least the following: > > `colors` is a sequence of Matplotlib colors. > `name` is a string (a name assigned to this colormap). Good point. I have added a docstring. In the process I did a little checking, found a bug (only for the odd case where N is specified and is less than the length of the list of colors), and fixed it. > > Seems obvious in retrospect, but of course that's too late ... > > By the way, how is the name attribute used? I'm not sure whether it is actually being used by anyone, but having a name attribute for each colormap could make it easier manage a set of colormaps. Eric > > Thanks, > Alan
For some reason when trying to save in PNG format on OS X 10.5.2, a window pops up with the error: Matplotlib backend_wx error cannot return std::string from Unicode object This is with the simple scipy demo at http://www.scipy.org/Cookbook/OptimizationDemo1 Gideon Simpson Department of Applied Physics & Applied Mathematics Columbia University gr...@co...
On 2008年4月12日, Alan G Isaac apparently wrote: > 1. Running anim.py at DOS prompt: it runs correctly until > the end: > Fatal Python error: PyEval_RestoreThread: NULL tstate OK, there is a simple fix to this: explicitly close the figure after the loop. I'll attach a fixed example file, in case a developer cares to substitute it. New question 1: why is this necessary? New question 2: why can I tab away from the Tk Window while this script is running but not tab back to it? Old question remaining: Running under the Python interpreter (using execfile): The Tk window will not display until the script has finished running, so the animation cannot be viewed. How can I run this animation from the interpreter window? Note that this seems closely related to New Question 2. Thank you, Alan Isaac
On 2008年4月11日, Eric Firing apparently wrote: > It sounds like what you want is a listed colormap with direct indexing > using a NoNorm() instance as the norm: > cmap = mpl.colors.ListedColormap(['k', 'r', 'b']) > norm = mpl.colors.NoNorm() > matshow(aa, cmap=cmap, norm=norm, interpolation='nearest') Perfect! I actually had found ListedColormap in the docs. It's name was very promising but the __init__ function had no help. Can I suggest adding at least the following: `colors` is a sequence of Matplotlib colors. `name` is a string (a name assigned to this colormap). Seems obvious in retrospect, but of course that's too late ... By the way, how is the name attribute used? Thanks, Alan
Thanks! Perfect! I *love* matplotlib!!! Darren Dale wrote: > On Saturday 12 April 2008 7:19:32 am Norbert Nemec wrote: > >> Hi there, >> >> I often have the case that I want to view different data sets that share >> one axis. Imagine, for example, a time series of several different >> observables. Since all observables may have different units, scales and >> offsets, I would want to display them as separate subplots that have the >> same x-axis (time) but indepent y scales. >> >> Is there a way to lock the scales of several subplots so that when I >> zoom into one of the subplots interactively, the scale of the other >> subplots is automatically adjusted? (Preferably something simple enough >> to use it in quick-and-dirty scripts or even interactive sessions.) >> > > I think shared_axis_demo.py, in the examples archive, is what you are looking > for. It is well documented, and simple enough to include here in its > entirety: > > """ > You can share the x or y axis limits for one axis with another by > passing an axes instance as a sharex or sharey kwarg. > > Changing the axis limits on one axes will be reflected automatically > in the other, and vice-versa, so when you navigate with the toolbar > the axes will follow each other on their shared axes. Ditto for > changes in the axis scaling (eg log vs linear). However, it is > possible to have differences in tick labeling, eg you can selectively > turn off the tick labels on one axes. > > The example below shows how to customize the tick labels on the > various axes. Shared axes share the tick locator, tick formatter, > view limits, and transformation (eg log, linear). But the ticklabels > themselves do not share properties. This is a feature and not a bug, > because you may want to make the tick labels smaller on the upper > axes, eg in the example below. > > If you want to turn off the ticklabels for a given axes (eg on > subplot(211) or subplot(212), you cannot do the standard trick > > setp(ax2, xticklabels=[]) > > because this changes the tick Formatter, which is shared among all > axes. But you can alter the visibility of the labels, which is a > property > > setp( ax2.get_xticklabels(), visible=False) > > > """ > from pylab import * > > t = arange(0.01, 5.0, 0.01) > s1 = sin(2*pi*t) > s2 = exp(-t) > s3 = sin(4*pi*t) > ax1 = subplot(311) > plot(t,s1) > setp( ax1.get_xticklabels(), fontsize=6) > > ## share x only > ax2 = subplot(312, sharex=ax1) > plot(t, s2) > # make these tick labels invisible > setp( ax2.get_xticklabels(), visible=False) > > # share x and y > ax3 = subplot(313, sharex=ax1, sharey=ax1) > plot(t, s3) > xlim(0.01,5.0) > show() > > > Darren > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save 100ドル. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
On Saturday 12 April 2008 7:19:32 am Norbert Nemec wrote: > Hi there, > > I often have the case that I want to view different data sets that share > one axis. Imagine, for example, a time series of several different > observables. Since all observables may have different units, scales and > offsets, I would want to display them as separate subplots that have the > same x-axis (time) but indepent y scales. > > Is there a way to lock the scales of several subplots so that when I > zoom into one of the subplots interactively, the scale of the other > subplots is automatically adjusted? (Preferably something simple enough > to use it in quick-and-dirty scripts or even interactive sessions.) I think shared_axis_demo.py, in the examples archive, is what you are looking for. It is well documented, and simple enough to include here in its entirety: """ You can share the x or y axis limits for one axis with another by passing an axes instance as a sharex or sharey kwarg. Changing the axis limits on one axes will be reflected automatically in the other, and vice-versa, so when you navigate with the toolbar the axes will follow each other on their shared axes. Ditto for changes in the axis scaling (eg log vs linear). However, it is possible to have differences in tick labeling, eg you can selectively turn off the tick labels on one axes. The example below shows how to customize the tick labels on the various axes. Shared axes share the tick locator, tick formatter, view limits, and transformation (eg log, linear). But the ticklabels themselves do not share properties. This is a feature and not a bug, because you may want to make the tick labels smaller on the upper axes, eg in the example below. If you want to turn off the ticklabels for a given axes (eg on subplot(211) or subplot(212), you cannot do the standard trick setp(ax2, xticklabels=[]) because this changes the tick Formatter, which is shared among all axes. But you can alter the visibility of the labels, which is a property setp( ax2.get_xticklabels(), visible=False) """ from pylab import * t = arange(0.01, 5.0, 0.01) s1 = sin(2*pi*t) s2 = exp(-t) s3 = sin(4*pi*t) ax1 = subplot(311) plot(t,s1) setp( ax1.get_xticklabels(), fontsize=6) ## share x only ax2 = subplot(312, sharex=ax1) plot(t, s2) # make these tick labels invisible setp( ax2.get_xticklabels(), visible=False) # share x and y ax3 = subplot(313, sharex=ax1, sharey=ax1) plot(t, s3) xlim(0.01,5.0) show() Darren
Hi there, I often have the case that I want to view different data sets that share one axis. Imagine, for example, a time series of several different observables. Since all observables may have different units, scales and offsets, I would want to display them as separate subplots that have the same x-axis (time) but indepent y scales. Is there a way to lock the scales of several subplots so that when I zoom into one of the subplots interactively, the scale of the other subplots is automatically adjusted? (Preferably something simple enough to use it in quick-and-dirty scripts or even interactive sessions.) Thanks for your help! Greetings, Norbert Nemec
what options we have for performing ssh (actually scp) on Windows and Linux from Python. Note that Linux has builtin ssh/scp, hence, pexpect should be a simple option, but to the best of my knowledge Windows does not anything. I would like to see a list of options on this. Would you please help me ? -- View this message in context: http://www.nabble.com/ssh-options-tp16646647p16646647.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Alan, It sounds like what you want is a listed colormap with direct indexing using a NoNorm() instance as the norm: aa = ones((2,3), dtype=int) aa[0,0] = 0 aa[:,2] = 2 cmap = mpl.colors.ListedColormap(['k', 'r', 'b']) norm = mpl.colors.NoNorm() matshow(aa, cmap=cmap, norm=norm, interpolation='nearest') The array has to be one of the integer dtypes. Also see examples/colorbar_only.py if you want to use a colorbar--but I suspect you won't for your present application. Eric Alan G Isaac wrote: > I have an integer array. > The number of different integers is small, > so small that I would like to define an > integer to color mapping and use this > with matshow. E.g., > 0 -> black > 1 -> red > 2 -> blue > etc > > Possible? > > Thank you, > Alan Isaac > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save 100ドル. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
I have an integer array. The number of different integers is small, so small that I would like to define an integer to color mapping and use this with matshow. E.g., 0 -> black 1 -> red 2 -> blue etc Possible? Thank you, Alan Isaac
I have a couple questions about anim.py: http://matplotlib.sourceforge.net/examples/anim.py I'm running Python 2.5.1 and Matplotlib 0.90.1 under Win 2000. 1. Running anim.py at DOS prompt: it runs correctly until the end: Fatal Python error: PyEval_RestoreThread: NULL tstate This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. How can I get rid of this error? 2. Running under the Python interpreter (using execfile): The Tk window will not display until the script has finished running, so the animation cannot be viewed. How can I run this animation from the interpreter window? Thank you, Alan Isaac
Hello, I wish to plot 4 different raster images within a figure, and later plot registered lines highlighting certain features of them. Here is the code to read one image and plot it, works as expcted: img = Image.open(sys.argv[1]) img1 = numpy.asarray(img) pylab.figure() pylab.imshow(img1) pylab.savefig('_imgok.jpg') Now, make a double-sized image array, and tile the original image into it: pylab.figure() YRES = img1.shape[0] XRES = img1.shape[1] twoimg = numpy.zeros((2*YRES,2*XRES,3)) #twoimg = numpy.empty((2*YRES,2*XRES,3),numpy.uint32) twoimg[0:YRES,0:XRES,:] = img1 twoimg[0:YRES,XRES:2*XRES,:] = img1 twoimg[YRES:2*YRES,0:XRES,:] = img1 pylab.imshow(twoimg, origin='upper', interpolation='nearest') pylab.gray() pylab.savefig('_imgproblem.jpg') It comes out strangely colored, vaguely as if the red and green channels were swapped. However, that's not it (I tried swapping). This is with maaplib-0.91 (-2?) on a mac 10.4.11, and I think the backend is GTKAgg Thanks for any advice (recent convert from matlab, quite happy...) __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Hello, I want to use imshow to make a real time waterfall plot. The attached code is the core of my application, and it works, but it is quite slow, around 200ms to update the plot. Is there a way to accelerate this? I have seen the blitting demos, and they work well for the line plots, but I could not figure out how to extend this functionality to imshow plots. In theory I could throw all of my data into a bitmap (since I don't really need the antialiasing etc provided by AGG) and display that directly in WX, but the trouble with that is I want to display the spectra at a given time and the waterfall plot with the same X axis, thus computing the area to display the bitmap seems tricky. Is there any built in MPL functionality for doing that? One question about the blitting demos: they do not seem to work well with resizing the window (which make sense because the blit buffer never gets informed of the window size change). Has anyone modified this code to allow it to work with resizing? I tried to connect to the RESIZE event and recapture the base canvas, but did not have any luck. Thanks, Glenn