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
(5) |
3
(8) |
4
(6) |
5
(9) |
6
(7) |
7
(6) |
8
(10) |
9
(27) |
10
(7) |
11
(22) |
12
(13) |
13
(7) |
14
(4) |
15
(12) |
16
(32) |
17
(26) |
18
(14) |
19
(1) |
20
(11) |
21
(6) |
22
(11) |
23
(17) |
24
(18) |
25
(28) |
26
(11) |
27
(6) |
28
(1) |
29
(10) |
30
(12) |
|
|
|
|
Paul Langevin wrote: > Hi, > > I'm wondering if it is Paul: No, it's not. > (or when will it be if not) possible to specify the desired boundary > for the triangulated meshes in order to design holes which seems > impossible at the moment (the boundary seems to always be the convex > hull of the set of points when using delaunay.Triangulation(x,y) ). > > Thanks. The delaunay package is an external package (from scipy) that is included in matplotlib for convenience. It's not maintained by the matplotlib developers. I'd ask on the scipy list. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328
Jeff, Thanks for the tip, it's now working perfectly However, there's still that border with the imshow plot, and I think it would be good to have it transparent There's a zoomed picture I made: http://img218.imageshack.us/img218/5833/imshowborderxz9.png You see the shadow around the data... It would be nice for next releases of Matplotlib to get rid of that, but I'm not able to patch it myself or so... I know there's still a lot of work with the lib but keep the good work, it is really fantastic Thanks for your help! Antoine De Pauw Collaborateur de recherches, Informatique - Research collaborator, IT Laboratoire de chimie quantique et photophysique - Quantum chemistry and photophysics laboratory Université Libre de Bruxelles - ULB -----Original Message----- From: Jeff Whitaker [mailto:js...@fa...] Sent: jeudi 25 septembre 2008 14:15 To: De Pauw Antoine Cc: 'Matplotlib Users' Subject: Re: [Matplotlib-users] Information request De Pauw Antoine wrote: > Hi Jeff, > > I finally found out how to fill my figure with a background color using > axes.set_axis_bgcolor(color), but I'm facing the following problem now: > > How could I get the lower color of a colormap? This is quite undocumented > and I dont know the colormap properties I could use for that > > I know there must be an accessible value somewhere, like for the > ax.get_yticklabels() you gave me > > If someone had the clue, my problems would then be completely solved > > Antoine De Pauw > Collaborateur de recherches, Informatique - Research collaborator, IT > Laboratoire de chimie quantique et photophysique - Quantum chemistry and > photophysics laboratory > Université Libre de Bruxelles - ULB > Antoine: To get the RGBA value associated with a particular data value, just call the colormap as a function as pass it that value. For example >>> import matplotlib.pyplot as plt >>> plt.cm.jet(1) (0.0, 0.0, 0.517825311942959, 1.0) BTW: the 'fill_color' kwarg of drawmapboundary basemap method allows you to set the background color of the map. http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html It fills only the map region (which for some projections, like the orthographic, is not the same as the axes region). -Jeff > > -----Original Message----- > From: Jeff Whitaker [mailto:js...@fa...] > Sent: mardi 23 septembre 2008 20:38 > To: De Pauw Antoine > Cc: 'John Hunter'; 'Matplotlib Users' > Subject: Re: [Matplotlib-users] Information request > > De Pauw Antoine wrote: > >> Jeff, >> >> I still don't know how to either remove this artifact or fill my arrays >> > with > >> values to remove empty regions, and I'll make a last attempt to resolve it >> >> I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56 >> >> The actual code snippet is here: >> http://snipplr.com/view/8307/map-plotting-python-code-temporary/ >> >> I hope you'll be able to reproduce it, I set the cmap to winter for you to >> see the gap... setting it to hot will make the grayish border visible in >> high resolution by zooming it... I think the border (not the empty zone) >> could be an artifact with the hot colormap >> >> >> Antoine De Pauw >> Collaborateur de recherches, Informatique - Research collaborator, IT >> Laboratoire de chimie quantique et photophysique - Quantum chemistry and >> photophysics laboratory >> Université Libre de Bruxelles - ULB >> >> >> > > Antoine: Here is a version that just plots the pixels directly, without > interpolating to a grid. I personally like this better, since you can > easily see where you actually have data. > > HTH, > > -Jeff > > from mpl_toolkits.basemap import Basemap > import matplotlib.pyplot as plt > import matplotlib.mlab as mlab > import numpy as np > import os > fileName = '20080821.b56' > titre='SO2' > legende='Delta Brightness Temperature (K)' > nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:])) > rawfile=np.fromfile(open(fileName,'rb'),'<d',-1) > Lat=rawfile[0:nbreligne] > Lon=rawfile[nbreligne:nbreligne*2] > Val=rawfile[nbreligne*21:nbreligne*22] > map=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,\ > urcrnrlon=180,llcrnrlon=-180,resolution='l') > x, y = map(Lon, Lat) > plt.scatter(x,y,s=25,c=Val,marker='s',edgecolor="None",cmap=plt.cm.winter,vm > in=-5,vmax=-1.2, > alpha=0.5) > cb=plt.colorbar(shrink=0.6) > cb.ax.set_ylabel(legende,fontsize=11) > for t in cb.ax.get_yticklabels(): > t.set_fontsize(7) > meridians = np.arange(-180,180,60) > parallels = np.arange(-90,90,30) > map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25) > map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25) > map.drawcoastlines(0.25,antialiased=1) > plt.title(titre) > plt.show() > >> -----Original Message----- >> From: Jeff Whitaker [mailto:js...@fa...] >> Sent: lundi 22 septembre 2008 13:59 >> To: De Pauw Antoine >> Cc: 'John Hunter'; 'Matplotlib Users' >> Subject: Re: [Matplotlib-users] Information request >> >> De Pauw Antoine wrote: >> >> >>> Jeff, >>> >>> I included here a figure where you'll see the border problem for imshow >>> > in > >>> my case >>> >>> http://img217.imageshack.us/img217/5240/testfigzp3.png >>> >>> The border wraps at -180 and 180 to form the white line >>> >>> PS: it is atmospheric ice and not SO2, I just omitted to change the title >>> >>> >> ^^ >> >> >>> Antoine De Pauw >>> Collaborateur de recherches, Informatique - Research collaborator, IT >>> Laboratoire de chimie quantique et photophysique - Quantum chemistry and >>> photophysics laboratory >>> Université Libre de Bruxelles - ULB >>> >>> >>> >> Antoine: I hate to keep repeating myself - but we can't do much if you >> don't provide a self-contained script, that I can run, which reproduces >> the problem. My guess is that the line along the dateline, and the >> point at the South Pole are missing values (which griddata set to >> missing because they are outside the extent of the data) - but that's >> just a guess until I can reproduce it. >> >> -Jeff >> >> >>> -----Original Message----- >>> From: Antoine De Pauw [mailto:and...@ul...] >>> Sent: jeudi 18 septembre 2008 17:23 >>> To: Jeff Whitaker; and...@ul... >>> Cc: 'John Hunter'; 'Matplotlib Users' >>> Subject: re:Re: [Matplotlib-users] Information request >>> >>> Jeff, >>> >>> No the example doesn't show that line >>> >>> If I reduce the amount of data, the border will be on every side of the >>> >>> >> plot >> >> >>> I'll show you an orthographic plot with no maskinf tomorrow and you will >>> >>> >> see >> >> >>> the problem easily, it wraps in a white line along the 0° meridian and a >>> white circle in the pole >>> >>> I think it's the imshow layer that is not totally transparent on the map >>> background.. I tried every trick I could for example to put some >>> >>> >> zero-valued >> >> >>> points on each corner to make imshow interpolate correctly the sides, but >>> that doesn't make any difference >>> >>> >>> >>> >>>> De Pauw Antoine wrote: >>>> >>>> >>>> >>>>> Jeff, >>>>> >>>>> Yes they disappear, and they fluctuate with the interpolation method >>>>> >>>>> >> used >> >> >>>>> For example, nearest interpolation don't show the line >>>>> >>>>> Also, if I reduce the grid resolution, the line is thicker, and if I >>>>> > use > >>>>> >>>>> >>>>> >>> a >>> >>> >>> >>>>> masked array to get rid of undesired values, the border shows really >>>>> strongly >>>>> >>>>> Here's an example everyone will see: >>>>> >>>>> http://img225.imageshack.us/img225/2671/testfigep2.png >>>>> >>>>> (everything except the clouds is noise) >>>>> >>>>> Antoine De Pauw >>>>> Collaborateur de recherches, Informatique - Research collaborator, IT >>>>> Laboratoire de chimie quantique et photophysique - Quantum chemistry >>>>> > and > >>>>> photophysics laboratory >>>>> Université Libre de Bruxelles - ULB >>>>> >>>>> >>>>> >>>>> >>>> Antoine: Sorry to seem dense, but I don't see anything wrong with that >>>> plot. I see a white border along the north and south pole, but I >>>> intrepret that to be missing values. However, my eyes are notoriously >>>> bad. I'd like to be to run a script that generates the artifacts >>>> myself, so I can zoom in and see the problem myself. Does the >>>> griddata_demo.py script show the same problem for you? >>>> >>>> -Jeff >>>> >>>> >>>> >>>>> -----Original Message----- >>>>> From: Jeff Whitaker [mailto:js...@fa...] >>>>> Sent: mercredi 17 septembre 2008 19:05 >>>>> To: John Hunter >>>>> Cc: De Pauw Antoine; Matplotlib Users >>>>> Subject: Re: [Matplotlib-users] Information request >>>>> >>>>> John Hunter wrote: >>>>> >>>>> >>>>> >>>>> >>>>>> On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jd...@gm...> >>>>>> >>>>>> >> wrote: >> >> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> Attached is a screenshot (zoom.png) from the gimp, zoomed in near the >>>>>>> axes border. The black horizontal line is the top axes border, the >>>>>>> horizontal grey line is the artifact, the vertical dashed line is a >>>>>>> grid line. I don't know if this offers a clue, but if you look at a >>>>>>> zoom in the upper right corner, the grey line seems to break up and >>>>>>> curve down and to the right (corner.png) >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> Sorry, screwed up corner.png (I attached the original and not the >>>>>> screenshot). The correct screenshot is attached >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> John: OK, now I finally see it. Antoine: Do these artifacts >>>>> disappear if you comment out the imshow call? >>>>> >>>>> -Jeff >>>>> >>>>> >>>>> >>>>> >>>>> >>>> -- >>>> Jeffrey S. Whitaker Phone : (303)497-6313 >>>> Meteorologist FAX : (303)497-6449 >>>> NOAA/OAR/PSD R/PSD1 Email : Jef...@no... >>>> 325 Broadway Office : Skaggs Research Cntr 1D-113 >>>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >> >> > > > -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328
Hi, Thanks for your reply and appologies for my late response. This indeed does the job. But after playing a little bit with the code, I have discovered a few things: first, I'd rather work with lists not tuples so I could actually change my huge array of points. second the array I described is kind of a pseudo 2D: It has one big row. head = [[0, 0, 10], [1, 0, 13], [2, 0, 11], [3, 0, 12], [1, 2, 11]] When I try to use a 3D array, with rows and columns import pylab as pl head = [[[0, 0, 10], [0, 1, 13]], [[1, 0, 11], [1, 1, 12]], [[2, 1, 11], [2, 2, 14]]] x, y, z = zip(*head) xi, yi = pl.arange(0, 4, 0.1), pl.arange(0, 3, 0.1) g = pl.griddata(x, y, z, xi, yi) pl.scatter(x, y) pl.contour(xi, yi, g) pl.show() I get this error: Traceback (most recent call last): File "asfplot.py", line 9, in <module> x, y, z = zip(*head) ValueError: need more than 2 values to unpack On Sat, Sep 20, 2008 at 2:19 PM, Goyo <goy...@gm...> wrote: > Try something like this: > > import pylab as pl > > head = ((0, 0, 10), > (1, 0, 13), > (2, 0, 11), > (3, 0, 12), > (1, 2, 11)) > > x, y, z = zip(*head) > xi, yi = pl.arange(0, 4, 0.1), pl.arange(0, 3, 0.1) > g = pl.griddata(x, y, z, xi, yi) > pl.scatter(x, y) > pl.contour(xi, yi, g) > > Level values are automatically chosen in this example but you can > provide the number of values or a sequence of them. > > Note that no extrapolation is done outside convex hull defined by input > data. > > Goyo > > El sáb, 20-09-2008 a las 11:13 +0200, Oz Nahum escribió: > > I'm trying again to understand how to plot scattered data from array into > > contour graph. > > I looked at > > > http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data > > and I understand I have to grid my data. However, in most samples the > plot > > is of a function. > > Let's say I want to plot some geological data, suppose water table > head, and > > I have the following 3D aray > > x y head > > head = ((0, 0, 10), > > (1, 0, 13), > > (2, 0, 11), > > (3, 0, 12), > > (1, 2, 11)) > > matplotlib has lot's of restrictions about how I can plot and > interpolate > > the data, which causes a lot of confusion in my side... > > I'll be happy if someone could supply me a clue of how to plot > contours of > > data which comes in arrays or raster format and not an equation. > > Thanks, > > Oz > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > > Build the coolest Linux based applications with Moblin SDK & win great > prizes > > Grand prize is a trip for two to an Open Source event anywhere in the > world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- .''`. : :' : We are debian.org. Lower your prices, `. `' surrender your code. `- We will add your hardware and software distinctiveness to our own. Resistance is futile. ---- Imagine there's no countries It isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace ---- You all must read 'The God Delusion' http://en.wikipedia.org/wiki/The_God_Delusion --- when one person suffers from a delusion it is called insanity. When many people suffer from a delusion it is called religion." Robert Pirsig, Zen and the Art of Motorcycle Maintenance
On Wed, Sep 24, 2008 at 9:35 PM, Dennis Newbold <den...@gm...> wrote: > Hi all, > > The "Installing" page on the matplotlib website says: "You > probably don't need to compile matplotlib unless you want to or work > on an obscure platform. There are binary builds for Windows, OS X and > many major linux distributions; see below". > > When I scrol below, under "Linux", I see > "To build all the backends on a binary linux distro such as redhat, > you need to install a number of the devel libs (and whatever > dependencies they require), I suggest > matplotlib core: zlib, zlib-devel, libpng, libpng-devel, freetype, > freetype-devel, freetype-utils > gtk/gtkagg backend: gtk2-devel, gtk+-devel, pygtk2, glib-devel, > pygtk2-devel, gnome-libs-devel, pygtk2-libglade > tk backend: tcl, tk, tkinter > wx/wxagg backends - the wxpython rpms from wxpython" These instructions were written a long time ago, before matplotlib was shipped with most linux distributions, and are for people who want to compile matplotlib from source. They need to be updated. > This doesn't tell me where to find a matplotlib rpm file, just a list > of the other stuff that I need to make sure my redhat system already > has (btw, I thought that was what a good rpm is supposed to do > anyway?) It's sually called python2.5-matplotlib or something like that. JDH
On Thu, Sep 25, 2008 at 6:34 AM, Peter Saffrey <pz...@dc...> wrote: > For me, the code below draws the top plot only half on the page. Can > anybody help me out? > > > > from pylab import * > > groups = [ [ 'A', 'B', 'C', 'D', 'E' ], > [ 'F', 'G', 'H', 'I' ], > [ 'M', 'N', 'O', 'P', 'Q' ] ] > > f = figure(1) > for i in range(len(groups)): > group = groups[i] > subplot(len(groups), 1, i) > for treatment in group: > plot(linspace(0, 1, 32), rand(32)) > > show() subplot indexing starts at 1 and not zero, which is a matlab compatibility feature, so perhaps subplot(len(groups), 1, i+1) does what you want JDH
On Thu, Sep 25, 2008 at 7:15 AM, Jeff Whitaker <js...@fa...> wrote: > De Pauw Antoine wrote: >> Hi Jeff, >> >> I finally found out how to fill my figure with a background color using >> axes.set_axis_bgcolor(color), but I'm facing the following problem now: >> >> How could I get the lower color of a colormap? This is quite undocumented >> and I don't know the colormap properties I could use for that >> >> I know there must be an accessible value somewhere, like for the >> ax.get_yticklabels() you gave me >> >> If someone had the clue, my problems would then be completely solved You can get the lowest color of a colormap by evaluating it at zero, eg In [1]: import matplotlib.cm as cm In [2]: cm.jet(0) Out[2]: (0.0, 0.0, 0.5, 1.0)
On Sat, Feb 9, 2008 at 11:05 AM, Jon Loehrke <jlo...@um...> wrote: > Sorry to bother everyone with this post. > > I am new to matplotlib and python in general and am finding a problem that I > don't understand. > > I've downloaded the scipy superpack (through easy_install) from C. > Fonnesbeck (http://trichech.us) and receive and error when plotting (example > below). > > Personally I do not know enough to diagnose it nor fix the problem. what is > _wx.py relate to? How am I getting C++ assertion failures, shouldn't this > go through gcc? GUI packages like wx cannot be run from the standard python shell, as you are trying to do in using the ex backend of matplotlib, because of threading issues. See http://matplotlib.sourceforge.net/interactive.html http://matplotlib.sourceforge.net/faq.html#SHOW http://matplotlib.sourceforge.net/doc/html/faq/installing_faq.html#id1 Short answer: when working interactively from the python shell, either use tkagg as your backend or ipython in pylab mode > ipython -pylab JDH
For me, the code below draws the top plot only half on the page. Can anybody help me out? from pylab import * groups = [ [ 'A', 'B', 'C', 'D', 'E' ], [ 'F', 'G', 'H', 'I' ], [ 'M', 'N', 'O', 'P', 'Q' ] ] f = figure(1) for i in range(len(groups)): group = groups[i] subplot(len(groups), 1, i) for treatment in group: plot(linspace(0, 1, 32), rand(32)) show() Thanks, Peter
Hi, I am trying to change my plots using another tk window I made, but it does not work well. I am wondering if someone could help me. Here is an example to try to change the X axis of the plot using scale bars on another Tk window. But once I run the program, the figure window for matplotlib gets darker several second later, and I cannot use pan/zoom buttons etc. -- #!/usr/bin/python from pylab import * from Tkinter import * class TkWindow(Frame): def init(self): self.vmin= IntVar() self.vmax= IntVar() self.vmin.set(0) self.vmax.set(10) l2=Frame(self) scale_vmin=Scale(l2,label='x(min)',variable=self.vmin, to=20,from_=-20,length=200,tickinterval=10, orient=HORIZONTAL) scale_vmax=Scale(l2,label='x(max)',variable=self.vmax, to=20,from_=-20,length=200,tickinterval=10, orient=HORIZONTAL) scale_vmin.pack(side=LEFT,padx=5) scale_vmax.pack(side=LEFT,padx=5) scale_vmin.config(command=self.exec_scales) scale_vmax.config(command=self.exec_scales) l2.pack(fill=X) def exec_scales(self,event): vmin=self.vmin.get() vmax=self.vmax.get() ax.set_xlim(vmin,vmax) draw() def __init__(self,ax,master=None): self.ax=ax Frame.__init__(self,master) self.init() self.pack() ### Begin ### ax=subplot(111) plot(arange(0,10)) tkw=TkWindow(ax) show() tkw.mainloop() --- Thanks a lot for your attention!! Hiro
Hi, I'm wondering if it is (or when will it be if not) possible to specify the desired boundary for the triangulated meshes in order to design holes which seems impossible at the moment (the boundary seems to always be the convex hull of the set of points when using delaunay.Triangulation(x,y) ). Thanks. _________________________________________________________________ Installez gratuitement les 20 émôticones Windows Live Messenger les plus fous ! Cliquez ici ! http://www.emoticones-messenger.fr/
De Pauw Antoine wrote: > Hi Jeff, > > I finally found out how to fill my figure with a background color using > axes.set_axis_bgcolor(color), but I'm facing the following problem now: > > How could I get the lower color of a colormap? This is quite undocumented > and I don’t know the colormap properties I could use for that > > I know there must be an accessible value somewhere, like for the > ax.get_yticklabels() you gave me > > If someone had the clue, my problems would then be completely solved > > Antoine De Pauw > Collaborateur de recherches, Informatique - Research collaborator, IT > Laboratoire de chimie quantique et photophysique - Quantum chemistry and > photophysics laboratory > Université Libre de Bruxelles - ULB > Antoine: To get the RGBA value associated with a particular data value, just call the colormap as a function as pass it that value. For example >>> import matplotlib.pyplot as plt >>> plt.cm.jet(1) (0.0, 0.0, 0.517825311942959, 1.0) BTW: the 'fill_color' kwarg of drawmapboundary basemap method allows you to set the background color of the map. http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html It fills only the map region (which for some projections, like the orthographic, is not the same as the axes region). -Jeff > > -----Original Message----- > From: Jeff Whitaker [mailto:js...@fa...] > Sent: mardi 23 septembre 2008 20:38 > To: De Pauw Antoine > Cc: 'John Hunter'; 'Matplotlib Users' > Subject: Re: [Matplotlib-users] Information request > > De Pauw Antoine wrote: > >> Jeff, >> >> I still don't know how to either remove this artifact or fill my arrays >> > with > >> values to remove empty regions, and I'll make a last attempt to resolve it >> >> I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56 >> >> The actual code snippet is here: >> http://snipplr.com/view/8307/map-plotting-python-code-temporary/ >> >> I hope you'll be able to reproduce it, I set the cmap to winter for you to >> see the gap... setting it to hot will make the grayish border visible in >> high resolution by zooming it... I think the border (not the empty zone) >> could be an artifact with the hot colormap >> >> >> Antoine De Pauw >> Collaborateur de recherches, Informatique - Research collaborator, IT >> Laboratoire de chimie quantique et photophysique - Quantum chemistry and >> photophysics laboratory >> Université Libre de Bruxelles - ULB >> >> >> > > Antoine: Here is a version that just plots the pixels directly, without > interpolating to a grid. I personally like this better, since you can > easily see where you actually have data. > > HTH, > > -Jeff > > from mpl_toolkits.basemap import Basemap > import matplotlib.pyplot as plt > import matplotlib.mlab as mlab > import numpy as np > import os > fileName = '20080821.b56' > titre='SO2' > legende='Delta Brightness Temperature (K)' > nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:])) > rawfile=np.fromfile(open(fileName,'rb'),'<d',-1) > Lat=rawfile[0:nbreligne] > Lon=rawfile[nbreligne:nbreligne*2] > Val=rawfile[nbreligne*21:nbreligne*22] > map=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,\ > urcrnrlon=180,llcrnrlon=-180,resolution='l') > x, y = map(Lon, Lat) > plt.scatter(x,y,s=25,c=Val,marker='s',edgecolor="None",cmap=plt.cm.winter,vm > in=-5,vmax=-1.2, > alpha=0.5) > cb=plt.colorbar(shrink=0.6) > cb.ax.set_ylabel(legende,fontsize=11) > for t in cb.ax.get_yticklabels(): > t.set_fontsize(7) > meridians = np.arange(-180,180,60) > parallels = np.arange(-90,90,30) > map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25) > map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25) > map.drawcoastlines(0.25,antialiased=1) > plt.title(titre) > plt.show() > >> -----Original Message----- >> From: Jeff Whitaker [mailto:js...@fa...] >> Sent: lundi 22 septembre 2008 13:59 >> To: De Pauw Antoine >> Cc: 'John Hunter'; 'Matplotlib Users' >> Subject: Re: [Matplotlib-users] Information request >> >> De Pauw Antoine wrote: >> >> >>> Jeff, >>> >>> I included here a figure where you'll see the border problem for imshow >>> > in > >>> my case >>> >>> http://img217.imageshack.us/img217/5240/testfigzp3.png >>> >>> The border wraps at -180 and 180 to form the white line >>> >>> PS: it is atmospheric ice and not SO2, I just omitted to change the title >>> >>> >> ^^ >> >> >>> Antoine De Pauw >>> Collaborateur de recherches, Informatique - Research collaborator, IT >>> Laboratoire de chimie quantique et photophysique - Quantum chemistry and >>> photophysics laboratory >>> Université Libre de Bruxelles - ULB >>> >>> >>> >> Antoine: I hate to keep repeating myself - but we can't do much if you >> don't provide a self-contained script, that I can run, which reproduces >> the problem. My guess is that the line along the dateline, and the >> point at the South Pole are missing values (which griddata set to >> missing because they are outside the extent of the data) - but that's >> just a guess until I can reproduce it. >> >> -Jeff >> >> >>> -----Original Message----- >>> From: Antoine De Pauw [mailto:and...@ul...] >>> Sent: jeudi 18 septembre 2008 17:23 >>> To: Jeff Whitaker; and...@ul... >>> Cc: 'John Hunter'; 'Matplotlib Users' >>> Subject: re:Re: [Matplotlib-users] Information request >>> >>> Jeff, >>> >>> No the example doesn't show that line >>> >>> If I reduce the amount of data, the border will be on every side of the >>> >>> >> plot >> >> >>> I'll show you an orthographic plot with no maskinf tomorrow and you will >>> >>> >> see >> >> >>> the problem easily, it wraps in a white line along the 0° meridian and a >>> white circle in the pole >>> >>> I think it's the imshow layer that is not totally transparent on the map >>> background.. I tried every trick I could for example to put some >>> >>> >> zero-valued >> >> >>> points on each corner to make imshow interpolate correctly the sides, but >>> that doesn't make any difference >>> >>> >>> >>> >>>> De Pauw Antoine wrote: >>>> >>>> >>>> >>>>> Jeff, >>>>> >>>>> Yes they disappear, and they fluctuate with the interpolation method >>>>> >>>>> >> used >> >> >>>>> For example, nearest interpolation don't show the line >>>>> >>>>> Also, if I reduce the grid resolution, the line is thicker, and if I >>>>> > use > >>>>> >>>>> >>>>> >>> a >>> >>> >>> >>>>> masked array to get rid of undesired values, the border shows really >>>>> strongly >>>>> >>>>> Here's an example everyone will see: >>>>> >>>>> http://img225.imageshack.us/img225/2671/testfigep2.png >>>>> >>>>> (everything except the clouds is noise) >>>>> >>>>> Antoine De Pauw >>>>> Collaborateur de recherches, Informatique - Research collaborator, IT >>>>> Laboratoire de chimie quantique et photophysique - Quantum chemistry >>>>> > and > >>>>> photophysics laboratory >>>>> Université Libre de Bruxelles - ULB >>>>> >>>>> >>>>> >>>>> >>>> Antoine: Sorry to seem dense, but I don't see anything wrong with that >>>> plot. I see a white border along the north and south pole, but I >>>> intrepret that to be missing values. However, my eyes are notoriously >>>> bad. I'd like to be to run a script that generates the artifacts >>>> myself, so I can zoom in and see the problem myself. Does the >>>> griddata_demo.py script show the same problem for you? >>>> >>>> -Jeff >>>> >>>> >>>> >>>>> -----Original Message----- >>>>> From: Jeff Whitaker [mailto:js...@fa...] >>>>> Sent: mercredi 17 septembre 2008 19:05 >>>>> To: John Hunter >>>>> Cc: De Pauw Antoine; Matplotlib Users >>>>> Subject: Re: [Matplotlib-users] Information request >>>>> >>>>> John Hunter wrote: >>>>> >>>>> >>>>> >>>>> >>>>>> On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jd...@gm...> >>>>>> >>>>>> >> wrote: >> >> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> Attached is a screenshot (zoom.png) from the gimp, zoomed in near the >>>>>>> axes border. The black horizontal line is the top axes border, the >>>>>>> horizontal grey line is the artifact, the vertical dashed line is a >>>>>>> grid line. I don't know if this offers a clue, but if you look at a >>>>>>> zoom in the upper right corner, the grey line seems to break up and >>>>>>> curve down and to the right (corner.png) >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> Sorry, screwed up corner.png (I attached the original and not the >>>>>> screenshot). The correct screenshot is attached >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> John: OK, now I finally see it. Antoine: Do these artifacts >>>>> disappear if you comment out the imshow call? >>>>> >>>>> -Jeff >>>>> >>>>> >>>>> >>>>> >>>>> >>>> -- >>>> Jeffrey S. Whitaker Phone : (303)497-6313 >>>> Meteorologist FAX : (303)497-6449 >>>> NOAA/OAR/PSD R/PSD1 Email : Jef...@no... >>>> 325 Broadway Office : Skaggs Research Cntr 1D-113 >>>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >> >> > > > -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328
Hi Jeff, I finally found out how to fill my figure with a background color using axes.set_axis_bgcolor(color), but I'm facing the following problem now: How could I get the lower color of a colormap? This is quite undocumented and I dont know the colormap properties I could use for that I know there must be an accessible value somewhere, like for the ax.get_yticklabels() you gave me If someone had the clue, my problems would then be completely solved Antoine De Pauw Collaborateur de recherches, Informatique - Research collaborator, IT Laboratoire de chimie quantique et photophysique - Quantum chemistry and photophysics laboratory Université Libre de Bruxelles - ULB -----Original Message----- From: Jeff Whitaker [mailto:js...@fa...] Sent: mardi 23 septembre 2008 20:38 To: De Pauw Antoine Cc: 'John Hunter'; 'Matplotlib Users' Subject: Re: [Matplotlib-users] Information request De Pauw Antoine wrote: > Jeff, > > I still don't know how to either remove this artifact or fill my arrays with > values to remove empty regions, and I'll make a last attempt to resolve it > > I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56 > > The actual code snippet is here: > http://snipplr.com/view/8307/map-plotting-python-code-temporary/ > > I hope you'll be able to reproduce it, I set the cmap to winter for you to > see the gap... setting it to hot will make the grayish border visible in > high resolution by zooming it... I think the border (not the empty zone) > could be an artifact with the hot colormap > > > Antoine De Pauw > Collaborateur de recherches, Informatique - Research collaborator, IT > Laboratoire de chimie quantique et photophysique - Quantum chemistry and > photophysics laboratory > Université Libre de Bruxelles - ULB > > Antoine: Here is a version that just plots the pixels directly, without interpolating to a grid. I personally like this better, since you can easily see where you actually have data. HTH, -Jeff from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt import matplotlib.mlab as mlab import numpy as np import os fileName = '20080821.b56' titre='SO2' legende='Delta Brightness Temperature (K)' nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:])) rawfile=np.fromfile(open(fileName,'rb'),'<d',-1) Lat=rawfile[0:nbreligne] Lon=rawfile[nbreligne:nbreligne*2] Val=rawfile[nbreligne*21:nbreligne*22] map=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,\ urcrnrlon=180,llcrnrlon=-180,resolution='l') x, y = map(Lon, Lat) plt.scatter(x,y,s=25,c=Val,marker='s',edgecolor="None",cmap=plt.cm.winter,vm in=-5,vmax=-1.2, alpha=0.5) cb=plt.colorbar(shrink=0.6) cb.ax.set_ylabel(legende,fontsize=11) for t in cb.ax.get_yticklabels(): t.set_fontsize(7) meridians = np.arange(-180,180,60) parallels = np.arange(-90,90,30) map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25) map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25) map.drawcoastlines(0.25,antialiased=1) plt.title(titre) plt.show() > -----Original Message----- > From: Jeff Whitaker [mailto:js...@fa...] > Sent: lundi 22 septembre 2008 13:59 > To: De Pauw Antoine > Cc: 'John Hunter'; 'Matplotlib Users' > Subject: Re: [Matplotlib-users] Information request > > De Pauw Antoine wrote: > >> Jeff, >> >> I included here a figure where you'll see the border problem for imshow in >> my case >> >> http://img217.imageshack.us/img217/5240/testfigzp3.png >> >> The border wraps at -180 and 180 to form the white line >> >> PS: it is atmospheric ice and not SO2, I just omitted to change the title >> > ^^ > >> Antoine De Pauw >> Collaborateur de recherches, Informatique - Research collaborator, IT >> Laboratoire de chimie quantique et photophysique - Quantum chemistry and >> photophysics laboratory >> Université Libre de Bruxelles - ULB >> >> > > Antoine: I hate to keep repeating myself - but we can't do much if you > don't provide a self-contained script, that I can run, which reproduces > the problem. My guess is that the line along the dateline, and the > point at the South Pole are missing values (which griddata set to > missing because they are outside the extent of the data) - but that's > just a guess until I can reproduce it. > > -Jeff > >> -----Original Message----- >> From: Antoine De Pauw [mailto:and...@ul...] >> Sent: jeudi 18 septembre 2008 17:23 >> To: Jeff Whitaker; and...@ul... >> Cc: 'John Hunter'; 'Matplotlib Users' >> Subject: re:Re: [Matplotlib-users] Information request >> >> Jeff, >> >> No the example doesn't show that line >> >> If I reduce the amount of data, the border will be on every side of the >> > plot > >> I'll show you an orthographic plot with no maskinf tomorrow and you will >> > see > >> the problem easily, it wraps in a white line along the 0° meridian and a >> white circle in the pole >> >> I think it's the imshow layer that is not totally transparent on the map >> background.. I tried every trick I could for example to put some >> > zero-valued > >> points on each corner to make imshow interpolate correctly the sides, but >> that doesn't make any difference >> >> >> >>> De Pauw Antoine wrote: >>> >>> >>>> Jeff, >>>> >>>> Yes they disappear, and they fluctuate with the interpolation method >>>> > used > >>>> For example, nearest interpolation don't show the line >>>> >>>> Also, if I reduce the grid resolution, the line is thicker, and if I use >>>> >>>> >> a >> >> >>>> masked array to get rid of undesired values, the border shows really >>>> strongly >>>> >>>> Here's an example everyone will see: >>>> >>>> http://img225.imageshack.us/img225/2671/testfigep2.png >>>> >>>> (everything except the clouds is noise) >>>> >>>> Antoine De Pauw >>>> Collaborateur de recherches, Informatique - Research collaborator, IT >>>> Laboratoire de chimie quantique et photophysique - Quantum chemistry and >>>> photophysics laboratory >>>> Université Libre de Bruxelles - ULB >>>> >>>> >>>> >>> Antoine: Sorry to seem dense, but I don't see anything wrong with that >>> plot. I see a white border along the north and south pole, but I >>> intrepret that to be missing values. However, my eyes are notoriously >>> bad. I'd like to be to run a script that generates the artifacts >>> myself, so I can zoom in and see the problem myself. Does the >>> griddata_demo.py script show the same problem for you? >>> >>> -Jeff >>> >>> >>>> -----Original Message----- >>>> From: Jeff Whitaker [mailto:js...@fa...] >>>> Sent: mercredi 17 septembre 2008 19:05 >>>> To: John Hunter >>>> Cc: De Pauw Antoine; Matplotlib Users >>>> Subject: Re: [Matplotlib-users] Information request >>>> >>>> John Hunter wrote: >>>> >>>> >>>> >>>>> On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jd...@gm...> >>>>> > wrote: > >>>>> >>>>> >>>>> >>>>> >>>>>> Attached is a screenshot (zoom.png) from the gimp, zoomed in near the >>>>>> axes border. The black horizontal line is the top axes border, the >>>>>> horizontal grey line is the artifact, the vertical dashed line is a >>>>>> grid line. I don't know if this offers a clue, but if you look at a >>>>>> zoom in the upper right corner, the grey line seems to break up and >>>>>> curve down and to the right (corner.png) >>>>>> >>>>>> >>>>>> >>>>>> >>>>> Sorry, screwed up corner.png (I attached the original and not the >>>>> screenshot). The correct screenshot is attached >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> John: OK, now I finally see it. Antoine: Do these artifacts >>>> disappear if you comment out the imshow call? >>>> >>>> -Jeff >>>> >>>> >>>> >>>> >>> -- >>> Jeffrey S. Whitaker Phone : (303)497-6313 >>> Meteorologist FAX : (303)497-6449 >>> NOAA/OAR/PSD R/PSD1 Email : Jef...@no... >>> 325 Broadway Office : Skaggs Research Cntr 1D-113 >>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg >>> >>> >>> >>> >>> >> >> > > > -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
Hallo new user, Furthermore, imagine that a large amount of data is being received over a slow connection. Socket 1 has no data in the read buffer, so it calls wxYield. There is still a pending event on Socket 2, so wxWidgets attempts to process that event. However, that event cannot complete, and it also calls wxYield. This will cause the infamous "wxYield called recursively" message to appear. Eventually the stack would fill up with recursive calls to wxYield as long as all the data has not yet arrived and the call stack cannot unwind. Many users immediately assume that this error message indicates a flaw in wxWidgets, when the truth is that it represents a problem in the application code. Simply stated, applications should be programmed so that this situation does not occur; the error is present to reveal a problem in the application code so that it can be fixed. Please complete one event completely before calling the other event -- View this message in context: http://www.nabble.com/new_user-matplotlib-help-tp15373200p19665311.html Sent from the matplotlib - users mailing list archive at Nabble.com.
That does the trick. I assumed that swaping the plot parameters would cause other problems, but it doesn't. That was simple! Thanks! Starting with the obvious -- x and y are arbitrary, so instead of plot (x, y) you can plot(y, x) If you need the data to be descending (smaller values on top, larger values on bottom) you can invert the normal ordering with ylim(big_value, small_value) If neither of these is what you are looking for, please elaborate a bit. JDH ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- View this message in context: http://www.nabble.com/Newbie-question---rotated-XY-chart-tp19661397p19662093.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Hi all, The "Installing" page on the matplotlib website says: "You probably don't need to compile matplotlib unless you want to or work on an obscure platform. There are binary builds for Windows, OS X and many major linux distributions; see below". When I scrol below, under "Linux", I see "To build all the backends on a binary linux distro such as redhat, you need to install a number of the devel libs (and whatever dependencies they require), I suggest matplotlib core: zlib, zlib-devel, libpng, libpng-devel, freetype, freetype-devel, freetype-utils gtk/gtkagg backend: gtk2-devel, gtk+-devel, pygtk2, glib-devel, pygtk2-devel, gnome-libs-devel, pygtk2-libglade tk backend: tcl, tk, tkinter wx/wxagg backends - the wxpython rpms from wxpython" This doesn't tell me where to find a matplotlib rpm file, just a list of the other stuff that I need to make sure my redhat system already has (btw, I thought that was what a good rpm is supposed to do anyway?) I've searched the Centos repository and tried to find one using rpmfind. Nada. I've already writeen seveal python programs which use matplotlib and run on Windows. But trying to get matplotlib installed on redhat (which dos not have a more modern package manager such as apt or yum, but is my employer's choice of Linux distros) -- that is starting to look like a major project. I tried building from the sources once and somehow got confused or took a wrong turn working through the list of all the preqrequisite packages. If anyone has done this, and can offer any advise or suggestions, I would appreciate it. Thanks alot, Dennis Newbold
On Wed, Sep 24, 2008 at 8:04 PM, greg7201 <gre...@ya...> wrote: > > I am such a matplotlib newbie... but it looks very cool. > > I need to create a basic graph, EXCEPT the x axis needs to go down the page, > and the y axis is across the bottom. (The chart is to display drilling > information and the norm for drilling engineers is to display depth - the x > axis - down the left side of graphs). > > Can matplotlib do this? Just point me in the right direction... I'll figure > it out. Starting with the obvious -- x and y are arbitrary, so instead of plot (x, y) you can plot(y, x) If you need the data to be descending (smaller values on top, larger values on bottom) you can invert the normal ordering with ylim(big_value, small_value) If neither of these is what you are looking for, please elaborate a bit. JDH
I am such a matplotlib newbie... but it looks very cool. I need to create a basic graph, EXCEPT the x axis needs to go down the page, and the y axis is across the bottom. (The chart is to display drilling information and the norm for drilling engineers is to display depth - the x axis - down the left side of graphs). Can matplotlib do this? Just point me in the right direction... I'll figure it out. Thanks in advance... -- View this message in context: http://www.nabble.com/Newbie-question---rotated-XY-chart-tp19661397p19661397.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Hi List, Attached is a closeup of two legends on a 2-panel figure. The first legend has 10 plots listed, the second has 1. I have set each legend identically: loc='upper right', pad=.3, handlelen=.1, handletextsep=.05. But it seems that while the horizontal padding is the same, the vertical padding is too large in the first legend, and too small in the second. The only difference between the two I am aware of is the number of plots listed (not contained in the axes, but listed in the legends). I'm using version 0.98.3 on windows. Any ideas? -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizona State University
On Wed, Sep 24, 2008 at 8:28 AM, C M <cmp...@gm...> wrote: > On Tue, Sep 23, 2008 at 7:22 PM, Anthony Floyd <ant...@gm...> wrote: >> On Tue, Sep 23, 2008 at 3:28 PM, C M <cmp...@gm...> wrote: [snip] > Thank you for the help. Unfortunately, I used some of your code and still had > the same problem I've been having, which is that it works as long as I > don't move > my frame (which contains the figure canvas)--if I move it to the left, > the leftmost > points on the graph produce a popup that pops up on the far right side of the > screen. Hi Che, It seems that the line in your code (line 156): popup.Position(mouseLocation, wx.Size(500,500)) is causing the problem. The second argument in this call is an offset, in pixels, of where you want your your pop-up to appear, with respect to the first argument. So, if you change this to: popup.Position(mouseLocation, (10,10)) then the pop-up behaves as expected, but offset 10 pixels to the right and 10 pixels down from the pick location. See: http://docs.wxwidgets.org/trunk/classwx_popup_window.html HTH, A>
Hi all, I have some broken scripts recently due to the upgrade from 0.91 to 0.98, most of them related to the imshow function. For example, when I run the following script, -------------------------------------------------------- from matplotlib.cm import * from pylab import * figure(1, (8, 10)) root = axes([0, 0, 1, 1]) xstart, ystart = .03, .97 rows, cols = 30, 2 # to accomodate 58 instances row_interval, col_interval = .94/rows, .94/cols cm_keys = [x for x in sorted(datad.keys()) if not x.endswith("_r")] print len(cm_keys) X = [0, 1] Y = array([X, X]) j = 1 for k in cm_keys: imshow(Y, extent=(xstart, xstart+.7*col_interval, ystart, ystart+.5*row_interval), cmap=get_cmap(name=k)) root.text(xstart+.75*col_interval, ystart, k, size=9) xstart += col_interval if j%2==0: xstart = .03 ystart -= row_interval j += 1 root.set_xlim(0, 1) root.set_ylim(0, 1) root.set_axis_off() savefig("cm_instances.pdf") ---------------------------------------------- Different versions gave me different results, with only the old version appears to be correct. In addition, when I wish to imshow a JPG image through PIL, the newer version gave me very low resolution. Can someone duplicate my observation? I appreciate any solution, thanks.
Tricky! That is exactly what I was looking for. Thanks John. Charles ========== Out of damp and gloomy days, out of solitude, out of loveless words directed at us, conclusions grow up in us like fungus: one morning they are there, we know not how, and they gaze upon us, morose and gray. Woe to the thinker who is not the gardener but only the soil of the plants that grow in him. - Friedrich Nietzsche On Wed, Sep 24, 2008 at 12:29 PM, John Hunter <jd...@gm...> wrote: > On Wed, Sep 24, 2008 at 1:21 PM, charles reid <cha...@gm...> > wrote: > > Hi - > > > > I haven't had any luck finding any examples of putting a subplot within a > > subplot in the documentation/website/example files. Is this possible? > For > > example, I would want something like this: > > __________________ > > | | | > > | | | > > | |_______| > > | | | > > | | | > > | _________|_______| > > > > Where (in the particular case above) subplot(1,2,1) itself contains a > > subplot(2,1,1) and subplot(2,1,2). Hopefully that looks ok/makes sense > to > > everyone. > > You can do > > subplot(121) > subplot(222) > subplot(224) > > Is this what you are after -- if not, see the axes_demo.py for finer > control > > http://matplotlib.sourceforge.net/examples/pylab_examples/axes_demo.py > > JDH >
On Wed, Sep 24, 2008 at 1:21 PM, charles reid <cha...@gm...> wrote: > Hi - > > I haven't had any luck finding any examples of putting a subplot within a > subplot in the documentation/website/example files. Is this possible? For > example, I would want something like this: > __________________ > | | | > | | | > | |_______| > | | | > | | | > | _________|_______| > > Where (in the particular case above) subplot(1,2,1) itself contains a > subplot(2,1,1) and subplot(2,1,2). Hopefully that looks ok/makes sense to > everyone. You can do subplot(121) subplot(222) subplot(224) Is this what you are after -- if not, see the axes_demo.py for finer control http://matplotlib.sourceforge.net/examples/pylab_examples/axes_demo.py JDH
Hi - I haven't had any luck finding any examples of putting a subplot within a subplot in the documentation/website/example files. Is this possible? For example, I would want something like this: __________________ | | | | | | | |_______| | | | | | | | _________|_______| Where (in the particular case above) subplot(1,2,1) itself contains a subplot(2,1,1) and subplot(2,1,2). Hopefully that looks ok/makes sense to everyone. Thanks, Charles ========== The 2nd Law of Thermodynamics... If you think things are a mess now, JUST WAIT!
On 24-Sep-08, at 6:15 PM, John Hunter wrote: > On Wed, Sep 24, 2008 at 6:05 AM, Saju Pillai <saj...@gm...> > wrote: >> Hi, >> >> Just started playing with matplotlib and it is very impressive. >> >> I have a question on controlling the x-axis values being plotted. >> Say I am recording a stock price every hour from say 10am to 3pm on a >> daily basis. I am trying to plot a multi-day chart such that after >> the >> data for 3pm on Day 1 is plotted, the next data should be for 10am on >> Day 2. Currently matplotlib is automatically adding all the hours >> from >> 3pm on Day 1 till 10pm on Day 2 even if I am only supplying the x- >> axis >> values that I want to be plotted. > > Take a look at the date_index_formatter.py example -- this uses daily > data and skips the weekends but it is conceptually similar to your > problem > > http://matplotlib.sourceforge.net/examples/pylab_examples/date_index_formatter.py This worked perfectly. Thanks. -srp > > > The approach is to plot evently spaced indices for the xaxis, and then > use your date vector as a lookup table for formatting the x > locations. The same approach could be used for a date index locator, > to put the ticks where you want them. See the chapter on tick > locating and formatting in the user's guide for background, and let me > know if you get stuck.
> locale -a locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_COLLATE to default locale: No such file or directory C POSIX Yes I think there is missing package, so i will look for that ... Mike, thank you for your help and make a good work in your bubble ;) Saber