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
(35) |
2
(29) |
3
(12) |
4
|
5
(8) |
6
(5) |
|
7
(3) |
8
(38) |
9
(15) |
10
(20) |
11
(14) |
12
(12) |
13
(17) |
|
14
(6) |
15
(41) |
16
(38) |
17
(31) |
18
(7) |
19
(14) |
20
(12) |
|
21
(3) |
22
(3) |
23
(15) |
24
(4) |
25
|
26
(3) |
27
(2) |
|
28
(7) |
29
(16) |
30
(17) |
31
(10) |
|
|
|
|
From: Eric F. <ef...@ha...> - 2008-12-30 23:19:39
|
Eric Emsellem wrote:
> Hi,
>
> I am trying to run a relatively large code, which includes some calls to and
> import from pylab/matplotlib, on a remote machine: the part of the code I am
> running is NOT performing any plot so there is no direct access to a display.
> Unfortunately it still crashes with something like:
>
> ---> 40 cursors.MOVE : gdk.Cursor(gdk.FLEUR),
> 41 cursors.HAND : gdk.Cursor(gdk.HAND2),
> 42 cursors.POINTER : gdk.Cursor(gdk.LEFT_PTR),
>
> RuntimeError: could not create GdkCursor object
>
> when it tries to reach the display when importing pylab I guess.
>
> I am now doing this from my laptop from a non-fixed IP and there is no easy way
> for me to forward the display (loging e.g. with ssh -X), or to just isolate the
> pylab part of the code (lots of files, lots of lines, etc).
>
> I am desperately trying to run this long calculation on that remote machine (and
> do it while my laptop is off, using "screen") because I need a lot of memory and
> CPU.... How can I overpass this easily (just allowing for the code not to crash
> with that initialisation and go on with the rest) ???
Eric,
You need to set a non-interactive backend, typically agg. The method
depends on exactly what you are doing and what your constraints are.
The easiest may be to put a matplotlibrc file in the directory from
which you are starting your ipython session, or running your script.
All it needs to contain is the single line:
backend : Agg
Alternatively, any script can start with
import matplotlib
matplotlib.use('agg')
This has to come before pylab is imported.
Eric
>
> thanks for any input there
>
> Eric
> ========
> running: matplotlib version 0.98.3 Python 2.5.1 (r251:54863, Aug 1 2008,
> 00:35:20) via IPython 0.9.1
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Jeff W. <js...@fa...> - 2008-12-30 23:14:09
|
Eric Emsellem wrote: > Hi, > > I am trying to run a relatively large code, which includes some calls to and > import from pylab/matplotlib, on a remote machine: the part of the code I am > running is NOT performing any plot so there is no direct access to a display. > Unfortunately it still crashes with something like: > > ---> 40 cursors.MOVE : gdk.Cursor(gdk.FLEUR), > 41 cursors.HAND : gdk.Cursor(gdk.HAND2), > 42 cursors.POINTER : gdk.Cursor(gdk.LEFT_PTR), > > RuntimeError: could not create GdkCursor object > > when it tries to reach the display when importing pylab I guess. > > I am now doing this from my laptop from a non-fixed IP and there is no easy way > for me to forward the display (loging e.g. with ssh -X), or to just isolate the > pylab part of the code (lots of files, lots of lines, etc). > > I am desperately trying to run this long calculation on that remote machine (and > do it while my laptop is off, using "screen") because I need a lot of memory and > CPU.... How can I overpass this easily (just allowing for the code not to crash > with that initialisation and go on with the rest) ??? > > thanks for any input there > > Eric > Eric: That looks like the error you get from pygtk when there's no X11 running. Can you just use a non-gui backend, like plain Agg? See http://matplotlib.sourceforge.net/faq/installing_faq.html#backends for how to change the default backend. -Jeff > ======== > running: matplotlib version 0.98.3 Python 2.5.1 (r251:54863, Aug 1 2008, > 00:35:20) via IPython 0.9.1 > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- 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 |
|
From: Eric E. <ems...@ob...> - 2008-12-30 23:12:35
|
sorry, I just found the simple way out and so I am answering my own post: use Agg instead of GtkAgg... sorry for the dummy question and the inconvenience, and have a nice end of 2008 cheers > I am trying to run a relatively large code, which includes some calls to and > import from pylab/matplotlib, on a remote machine: the part of the code I am > running is NOT performing any plot so there is no direct access to a display. > Unfortunately it still crashes with something like: > > ---> 40 cursors.MOVE : gdk.Cursor(gdk.FLEUR), > 41 cursors.HAND : gdk.Cursor(gdk.HAND2), > 42 cursors.POINTER : gdk.Cursor(gdk.LEFT_PTR), > > RuntimeError: could not create GdkCursor object > > when it tries to reach the display when importing pylab I guess. > > I am now doing this from my laptop from a non-fixed IP and there is no easy way > for me to forward the display (loging e.g. with ssh -X), or to just isolate the > pylab part of the code (lots of files, lots of lines, etc). > > I am desperately trying to run this long calculation on that remote machine (and > do it while my laptop is off, using "screen") because I need a lot of memory and > CPU.... How can I overpass this easily (just allowing for the code not to crash > with that initialisation and go on with the rest) ??? > > thanks for any input there |
|
From: Jeff W. <js...@fa...> - 2008-12-30 23:11:14
|
Rob Frohne wrote: > Hi, > > I think I am running into the same thing John is here. When you want to > display the whole earth in 'aeqd' mode, the projection needs to be onto a > circle. As it is, what is plotted is a square that just fits inside the > circle I want. Here is a link to a photo of the kind of projection I want. > > http://www.wm7d.net/az_proj/images/lon_anim_shaded.gif > > Is there a way to get the whole earth plotted with 'aeqd'? > Rob: No, you can't get the whole earth - the most you can get is the cube that fits within it. I can look into adding that functionality for the aeqd projection if there's a real use case. Note that there are other whole-earth projections available (mollweide, vandergrinten, robinson, sinuisoidal etc). These projections have much less distortion far away from the center of the map than the azimuthal equidistant does. Why do you want to use aeqd to plot the whole globe? -Jeff > Thanks, > > Rob > > > John [H2O] wrote: > >> Hello, >> >> I'm creating a web application that will take user input from a javascript >> map to give me bounding coordinates (i.e. urcrnrlat, urcrnrlon, llcrnrlat, >> llcrnrlon) and possibly a switch for polar projection. Other than that I >> have no further information. Which projection is the most suitable to >> handle anything from a 'global' plot to a zoom say over a state? I don't >> see the zoom being too tight, but global projections are likely. I >> personally prefer Equal Area, hence right now I'm working with 'aeqd', but >> I seem to have problems if the plot is global with that projection. >> >> Just looking for advice, opinions, and ideally examples if anyone has >> created a similar function / module to use in a web environment. >> >> Thanks! >> -john >> >> > > -- 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 |
|
From: Eric E. <ems...@ob...> - 2008-12-30 23:05:18
|
Hi,
I am trying to run a relatively large code, which includes some calls to and
import from pylab/matplotlib, on a remote machine: the part of the code I am
running is NOT performing any plot so there is no direct access to a display.
Unfortunately it still crashes with something like:
---> 40 cursors.MOVE : gdk.Cursor(gdk.FLEUR),
41 cursors.HAND : gdk.Cursor(gdk.HAND2),
42 cursors.POINTER : gdk.Cursor(gdk.LEFT_PTR),
RuntimeError: could not create GdkCursor object
when it tries to reach the display when importing pylab I guess.
I am now doing this from my laptop from a non-fixed IP and there is no easy way
for me to forward the display (loging e.g. with ssh -X), or to just isolate the
pylab part of the code (lots of files, lots of lines, etc).
I am desperately trying to run this long calculation on that remote machine (and
do it while my laptop is off, using "screen") because I need a lot of memory and
CPU.... How can I overpass this easily (just allowing for the code not to crash
with that initialisation and go on with the rest) ???
thanks for any input there
Eric
========
running: matplotlib version 0.98.3 Python 2.5.1 (r251:54863, Aug 1 2008,
00:35:20) via IPython 0.9.1
|
|
From: Christopher B. <c-...@as...> - 2008-12-30 22:16:14
|
Hi, How can I get the position, in x coordinates/units, of the legend? Specifically, I'd like to get the center of the legend box, because I want to add some text that is centered-aligned with the legend. Thanks. -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizona State University |
|
From: Rob F. <fr...@wa...> - 2008-12-30 22:02:07
|
I just thought I would include some code so you can see what I mean.
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import numpy as np
map=Basemap(projection='aeqd', lat_0=46, lon_0=-118.4, width=28300000,
height=28300000,
resolution='c', area_thresh=1000.)
map.drawcoastlines()
map.drawcountries()
map.fillcontinents(color='coral')
map.drawmapboundary()
plt.show()
Rob Frohne wrote:
>
> Hi,
>
> I think I am running into the same thing John is here. When you want to
> display the whole earth in 'aeqd' mode, the projection needs to be onto a
> circle. As it is, what is plotted is a square that just fits inside the
> circle I want. Here is a link to a photo of the kind of projection I
> want.
>
> http://www.wm7d.net/az_proj/images/lon_anim_shaded.gif
>
> Is there a way to get the whole earth plotted with 'aeqd'?
>
> Thanks,
>
> Rob
>
>
> John [H2O] wrote:
>>
>> Hello,
>>
>> I'm creating a web application that will take user input from a
>> javascript map to give me bounding coordinates (i.e. urcrnrlat,
>> urcrnrlon, llcrnrlat, llcrnrlon) and possibly a switch for polar
>> projection. Other than that I have no further information. Which
>> projection is the most suitable to handle anything from a 'global' plot
>> to a zoom say over a state? I don't see the zoom being too tight, but
>> global projections are likely. I personally prefer Equal Area, hence
>> right now I'm working with 'aeqd', but I seem to have problems if the
>> plot is global with that projection.
>>
>> Just looking for advice, opinions, and ideally examples if anyone has
>> created a similar function / module to use in a web environment.
>>
>> Thanks!
>> -john
>>
>
>
--
View this message in context: http://www.nabble.com/dynamic-basemap-tp20121594p21223795.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Rob F. <fr...@wa...> - 2008-12-30 22:00:15
|
Hi, I think I am running into the same thing John is here. When you want to display the whole earth in 'aeqd' mode, the projection needs to be onto a circle. As it is, what is plotted is a square that just fits inside the circle I want. Here is a link to a photo of the kind of projection I want. http://www.wm7d.net/az_proj/images/lon_anim_shaded.gif Is there a way to get the whole earth plotted with 'aeqd'? Thanks, Rob John [H2O] wrote: > > Hello, > > I'm creating a web application that will take user input from a javascript > map to give me bounding coordinates (i.e. urcrnrlat, urcrnrlon, llcrnrlat, > llcrnrlon) and possibly a switch for polar projection. Other than that I > have no further information. Which projection is the most suitable to > handle anything from a 'global' plot to a zoom say over a state? I don't > see the zoom being too tight, but global projections are likely. I > personally prefer Equal Area, hence right now I'm working with 'aeqd', but > I seem to have problems if the plot is global with that projection. > > Just looking for advice, opinions, and ideally examples if anyone has > created a similar function / module to use in a web environment. > > Thanks! > -john > -- View this message in context: http://www.nabble.com/dynamic-basemap-tp20121594p21223766.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: John H. <jd...@gm...> - 2008-12-30 19:50:34
|
On Tue, Dec 30, 2008 at 1:10 PM, Eric Firing <ef...@ha...> wrote: > Michael Hearne wrote: >> I am posting yet another question about colormaps, as I am having >> trouble grasping the fundamentals of the way the color model works in >> Matplotlib. > > Mike, > > I recently added examples/pylab_examples/custom_cmap.py with an > extensive docstring, partly stolen from the cookbook, to try to explain > and illustrate the use of LinearSegmentedColormap. Online here http://matplotlib.sourceforge.net/examples/pylab_examples/custom_cmap.html JDH |
|
From: John H. <jd...@gm...> - 2008-12-30 19:48:56
|
On Tue, Dec 30, 2008 at 1:31 PM, davev <dv...@li...> wrote: > > Thank you John, that made the difference. I had read that you needed to call > the draw function for the canvas first but it wasn't clear from the > examples. Now that you have given me the correct place to make the call, > things are working as expected. > > If we wanted to, this small project could easily be turned into an > additional example for the animation example code so that others could > potentially benefit from it as well. If you think that is a good idea, let > me know and I'll look at making it happen. At the very least, the final > version of the files could be posted so that others could easily > view/download the files as example code. I would include the wxGlade file so > that there would also be an example of that available as well. Sure, that sounds great. I think the example with the start and stop buttons would be nice, as would the wxglade part. I can add them to the animations examples dir. JDH |
|
From: Michael H. <mh...@us...> - 2008-12-30 19:38:19
|
Looking at Eric's documentation, I now understand that my cdict will not work. I retract my question for now until I can figure out how to make a cdict that looks like what I want. Thanks. Eric Firing wrote: > Michael Hearne wrote: >> I am posting yet another question about colormaps, as I am having >> trouble grasping the fundamentals of the way the color model works in >> Matplotlib. > > Mike, > > I recently added examples/pylab_examples/custom_cmap.py with an > extensive docstring, partly stolen from the cookbook, to try to > explain and illustrate the use of LinearSegmentedColormap. > > examples/api/colorbar_only.py gives an example of a ListedColormap, > although it sounds to me like what you want really is the > LinearSegmentedColormap. > > Eric |
|
From: davev <dv...@li...> - 2008-12-30 19:31:25
|
Thank you John, that made the difference. I had read that you needed to call
the draw function for the canvas first but it wasn't clear from the
examples. Now that you have given me the correct place to make the call,
things are working as expected.
If we wanted to, this small project could easily be turned into an
additional example for the animation example code so that others could
potentially benefit from it as well. If you think that is a good idea, let
me know and I'll look at making it happen. At the very least, the final
version of the files could be posted so that others could easily
view/download the files as example code. I would include the wxGlade file so
that there would also be an example of that available as well.
Thanks again for the help.
dave
John Hunter-4 wrote:
>
> On Mon, Dec 29, 2008 at 2:04 PM, davev <dv...@li...> wrote:
>> Will do (done actually). Here is the list of files: MyFrame.py
>> HeartPanel.py
>> app.py anim.wxg I've included the wxGlade file just to be complete.
>> Please
>> let me know if you see anything that is obviously wrong here. It's not
>> much
>> different from some of the examples I've looked at but doesn't produce
>> similar results. dave
>
> The problem was that you did not call "draw" in your plot init method
> before saving the background region. Unless you are in interactive
> mode in pylab, you must manually force a figure draw with a call to
> figure.canvas.draw. Eg, the method should look like::
>
> def init_plot(self):
> '''
> Method to initialize the plot that is used to animate the display.
> '''
> self.figure.subplots_adjust(left=0, top=1, right=1, bottom=0)
> self.axes = self.figure.add_subplot(111)
> self.axes.set_axis_bgcolor('black')
> self.figure.canvas.draw()
> if self.bgnd == None:
> self.bgnd = self.canvas.copy_from_bbox(self.axes.bbox)
>
> self.x_data = num.arange(0, 2*num.pi, 0.01)
> self.line = self.axes.plot(self.x_data, \
> num.sin(self.x_data), \
> color='green', \
> figure=self.figure, \
> lw=2, \
> animated=True)
> self.axes.hold(False)
>
>
> I was able to run your example, and with these changes it works as
> expected.
>
> JDH
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
View this message in context: http://www.nabble.com/python-and-matplotlib-animation-tp21185506p21222019.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Eric F. <ef...@ha...> - 2008-12-30 19:10:26
|
Michael Hearne wrote: > I am posting yet another question about colormaps, as I am having > trouble grasping the fundamentals of the way the color model works in > Matplotlib. Mike, I recently added examples/pylab_examples/custom_cmap.py with an extensive docstring, partly stolen from the cookbook, to try to explain and illustrate the use of LinearSegmentedColormap. examples/api/colorbar_only.py gives an example of a ListedColormap, although it sounds to me like what you want really is the LinearSegmentedColormap. Eric |
|
From: Michael H. <mh...@us...> - 2008-12-30 17:56:02
|
I am posting yet another question about colormaps, as I am having
trouble grasping the fundamentals of the way the color model works in
Matplotlib.
There are many examples on-line of very nice looking continuous color
images, such as the one that would be produced by using this code:
/delta = 0.005
extent = (-3,4,-4,3)
x = arange(-3.0, 4.001, delta)
y = arange(-4.0, 3.001, 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 = (Z1 - Z2) * 10
#normalize the example Z data to be between 0 and 10
Z = ((Z - Z.min())/(Z.max() - Z.min()))*10
jet()
imshow(Z)
show()
/However, I can't find any similar examples for custom colormaps. Below
is some test code I wrote to try to understand this. In it I have
hard-coded a color dictionary (suitable for use with a
LinearSegmentedColormap), a color list (suitable for use with a
ListedColormap), and an array of Z values (appropriate for a Boundary
norm). I have tried various combinations of Listed and LinearSegmented
colormaps, and they either show patches of very discrete colors, or no
colors, or the resulting image blows up when I call savefig().
My goal here is to display the Z data in a continuous colormap where the
values are interpolated according to either the color dictionary or
color list I have defined.
A final side question: Does a tutorial on the matplotlib color model
exist anywhere? This would be a really useful resource for me, and
perhaps for others.
Code is appended below.
Thanks,
Mike
#!/usr/bin/env python
'''
Trying to figure out how to make a smooth continuous image with my
custom colormap
'''
from pylab import *
from matplotlib.colors import
ListedColormap,LinearSegmentedColormap,Normalize,BoundaryNorm
isListed = True
delta = 0.005
extent = (-3,4,-4,3)
x = arange(-3.0, 4.001, delta)
y = arange(-4.0, 3.001, 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 = (Z1 - Z2) * 10
#normalize the example Z data to be between 0 and 10 (to match my
colormap data)
Z = ((Z - Z.min())/(Z.max() - Z.min()))*10
cdict = {'blue': [1.0,
1.0,
1.0,
1.0,
1.0,
0.57647058823529407,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0],
'green': [1.0,
1.0,
0.80000000000000004,
0.90196078431372551,
1.0,
1.0,
1.0,
0.78431372549019607,
0.56862745098039214,
0.0,
0.0,
0.0],
'red': [1.0,
1.0,
0.74901960784313726,
0.62745098039215685,
0.50196078431372548,
0.47843137254901963,
1.0,
1.0,
1.0,
1.0,
0.78431372549019607,
0.50196078431372548]}
clist = array([[ 1. , 1. , 1. ],
[ 1. , 1. , 1. ],
[ 0.74901961, 0.8 , 1. ],
[ 0.62745098, 0.90196078, 1. ],
[ 0.50196078, 1. , 1. ],
[ 0.47843137, 1. , 0.57647059],
[ 1. , 1. , 0. ],
[ 1. , 0.78431373, 0. ],
[ 1. , 0.56862745, 0. ],
[ 1. , 0. , 0. ],
[ 0.78431373, 0. , 0. ],
[ 0.50196078, 0. , 0. ]])
boundaries = array([ 0., 1., 2., 3., 4., 5., 6., 7.,
8., 9., 10., 13.])
|
|
From: B C. <clo...@ya...> - 2008-12-30 15:32:02
|
Christian, The answer to your second question is a little more involved and I think there are a few posts regarding custom colormaps on the mailing list that may be of interest...I'd try searching through those. I may not be the best person to answer that question. Also you may be interested in exploring the *kwargs vmin and vmax of the imshow command. They may do what you need as well: http://matplotlib.sourceforge.net/api/axes_api.html?highlight=imshow#matplotlib.axes.Axes.imshow As for your first question try the following in ipython with the -pylab flag: import numpy as N a = N.random.rand(50) a*=100 plot(a) ax = gca() ax.set_xlim(0,25) # The set_xlim and set_ylim may be what you're looking for... ax.set_ylim(0,50) show() --- On Mon, 12/29/08, Christian Lerrahn <li...@pe...> wrote: From: Christian Lerrahn <li...@pe...> Subject: [Matplotlib-users] Manually limiting value ranges To: mat...@li... Date: Monday, December 29, 2008, 11:19 PM Hi, I've been trying to do this for a while but just can't get it to work. :( There are 2 things I want to do. 1. I want to limit the value range in a line plot from matplotlib.pyplot.plot(). I thought that clip_box would do exactly that but setting something like [[-1,1],[-5,5]] or the like doesn't seem to have any effect. 2. In a 2D map plot from matplotlib.pyplot.imshow(), I would like to set the limits for the colour bar manually. I.e. I want the colours to be equally distributed over a fixed range. In both cases, the background to my attempt of using fixed values is that I'm producing a time series of plots via script and want all the plots to be directly comparable. Did I overlook this in the examples (or the documentation) or is there really no simple way of doing this? Cheers, Christian ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Christian L. <li...@pe...> - 2008-12-30 06:46:01
|
Hi, I've been trying to do this for a while but just can't get it to work. :( There are 2 things I want to do. 1. I want to limit the value range in a line plot from matplotlib.pyplot.plot(). I thought that clip_box would do exactly that but setting something like [[-1,1],[-5,5]] or the like doesn't seem to have any effect. 2. In a 2D map plot from matplotlib.pyplot.imshow(), I would like to set the limits for the colour bar manually. I.e. I want the colours to be equally distributed over a fixed range. In both cases, the background to my attempt of using fixed values is that I'm producing a time series of plots via script and want all the plots to be directly comparable. Did I overlook this in the examples (or the documentation) or is there really no simple way of doing this? Cheers, Christian |
|
From: John H. <jd...@gm...> - 2008-12-30 02:38:28
|
On Mon, Dec 29, 2008 at 2:04 PM, davev <dv...@li...> wrote:
> Will do (done actually). Here is the list of files: MyFrame.py HeartPanel.py
> app.py anim.wxg I've included the wxGlade file just to be complete. Please
> let me know if you see anything that is obviously wrong here. It's not much
> different from some of the examples I've looked at but doesn't produce
> similar results. dave
The problem was that you did not call "draw" in your plot init method
before saving the background region. Unless you are in interactive
mode in pylab, you must manually force a figure draw with a call to
figure.canvas.draw. Eg, the method should look like::
def init_plot(self):
'''
Method to initialize the plot that is used to animate the display.
'''
self.figure.subplots_adjust(left=0, top=1, right=1, bottom=0)
self.axes = self.figure.add_subplot(111)
self.axes.set_axis_bgcolor('black')
self.figure.canvas.draw()
if self.bgnd == None:
self.bgnd = self.canvas.copy_from_bbox(self.axes.bbox)
self.x_data = num.arange(0, 2*num.pi, 0.01)
self.line = self.axes.plot(self.x_data, \
num.sin(self.x_data), \
color='green', \
figure=self.figure, \
lw=2, \
animated=True)
self.axes.hold(False)
I was able to run your example, and with these changes it works as expected.
JDH
|