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
(19) |
2
(28) |
3
(8) |
|
4
(15) |
5
(20) |
6
(23) |
7
(12) |
8
(11) |
9
(13) |
10
(4) |
|
11
(9) |
12
(34) |
13
(33) |
14
(24) |
15
(15) |
16
(12) |
17
(8) |
|
18
(5) |
19
(5) |
20
(6) |
21
(10) |
22
(9) |
23
(18) |
24
(10) |
|
25
(7) |
26
(13) |
27
(18) |
28
(29) |
29
(4) |
30
(5) |
31
(2) |
|
From: Luis O. B. G. <io...@gm...> - 2009-10-10 02:43:38
|
Hi everybody,
Could you help me with this problem: I can import matplotlib from the
shell, it displayed this
>>> import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/dist-packages/matplotlib/__init__.py", line
696, in <module>
rcParams = rc_params()
File "/usr/lib/python2.6/dist-packages/matplotlib/__init__.py", line
617, in rc_params
fname = matplotlib_fname()
File "/usr/lib/python2.6/dist-packages/matplotlib/__init__.py", line
567, in matplotlib_fname
fname = os.path.join(get_configdir(), 'matplotlibrc')
File "/usr/lib/python2.6/dist-packages/matplotlib/__init__.py", line
240, in wrapper
ret = func(*args, **kwargs)
File "/usr/lib/python2.6/dist-packages/matplotlib/__init__.py", line
436, in _get_configdir
raise RuntimeError("'%s' is not a writable dir; you must set
%s/.matplotlib to be a writable dir. You can also set environment
variable MPLCONFIGDIR to any writable directory where you want
matplotlib data stored "% (h, h))
RuntimeError: '/home/ionek' is not a writable dir; you must set
/home/ionek/.matplotlib to be a writable dir. You can also set
environment variable MPLCONFIGDIR to any writable directory where you
want matplotlib data stored
>>>
I don't know what to do.
Best regards
Luis Omar
|
|
From: Eric F. <ef...@ha...> - 2009-10-10 02:33:25
|
Dr. Phillip M. Feldman wrote: > I am creating a scatter plot using pyplot.scatter(), and adding a colorbar > via pyplot.colorbar(). The result is very nice, except that there is a > large amount of empty space between the right-hand edge of the axes and the > figure window. When I adjust the right-hand margin using something like > pyplot.subplots_adjust(right=0.95), the right-hand margin is in fact > reduced, but the colorbar remains in the same location and is consequently > inside the axes. Any advice will be appreciated. Try calling subplots_adjust(right=0.99) before calling colorbar. Then the colorbar axes will be generated by stealing space from the enlarged main axes. Eric |
|
From: Dr. P. M. F. <pfe...@ve...> - 2009-10-09 23:07:43
|
I am creating a scatter plot using pyplot.scatter(), and adding a colorbar via pyplot.colorbar(). The result is very nice, except that there is a large amount of empty space between the right-hand edge of the axes and the figure window. When I adjust the right-hand margin using something like pyplot.subplots_adjust(right=0.95), the right-hand margin is in fact reduced, but the colorbar remains in the same location and is consequently inside the axes. Any advice will be appreciated. -- View this message in context: http://www.nabble.com/how-to-decrease-right-margin-and-move-colorbar--tp25829194p25829194.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Andrew S. <str...@as...> - 2009-10-09 21:26:06
|
Matthias Michler wrote: > Hello list, > > I'm not an expert in axes3d, but in case the feature which Nicolas requested > is not possible in an easy manner up to now, I propose an additional kwarg > for axes3d.Axes3D.contour. Something like *offset*. If offset is None the > z-values of the contour lines corresponds to given Z and otherwise offset is > used for the z-values of the contour lines. > I attached a changed axes3d.py and a patch against current svn. The result is > illustrated in the contour3d_demo.png. > > Could any of the experts have a look at it and tell me if this could be > useful, please? > > Thanks in advance for any comments. > > Kind regards > Matthias > > On Wednesday 30 September 2009 19:22:42 Nicolas Bigaouette wrote: > >> Hi, >> I have a nice plot_surface() using mplot3d (see attachement). >> >> I'd like to project the surface on the axis xoy, xoz and yoz with a >> contour, similar to this figure: >> http://homepages.ulb.ac.be/~dgonze/INFO/matlab/fig19.jpg >> >> Is it possible using matplotlib and mplot3d? >> >> Thanx! >> > > Hi Matthias, I committed your patch to a github branch of MPL, but I'll let Reinier actually commit something based on this to MPL. http://github.com/astraw/matplotlib/tree/dev/michler-3d-contourf-offsets -Andrew |
|
From: Gökhan S. <gok...@gm...> - 2009-10-09 16:14:52
|
On Fri, Oct 9, 2009 at 10:41 AM, Renato Alves <rj...@ig...>wrote: > Hi everyone, > > I've been using matplotlib for a while but mostly using the pyplot > functions and going as far as changing their initial input parameters. > > Now I need to make a boxplot and include names on the X axis as opposed > to the default numbers. > > I've searched extensively on the docs and using google but I reached a > dead end. So, could someone point me in the direction of how can I > change the plot to use names instead of numbers on the x axis (vertical > boxplot) or y axis (horizontal boxplot)? > > Thanks, > Renato > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > In Ipython -pylab I[1]: a = np.random.rand(10) I[3]: b = np.random.rand(10) I[4]: boxplot([a,b], positions=[1,2]) I[5]: locs, labels = xticks([1,2], ['a', 'b']) #for fine-tuning setp(labels, 'rotation', 'horizontal') xticklabels = getp(gca(), 'xticklabels') yticklabels = getp(gca(), 'yticklabels') setp(xticklabels, fontsize=14, weight='bold') setp(yticklabels, fontsize=14, weight='bold') Cheers :) -- Gökhan |
|
From: Renato A. <rj...@ig...> - 2009-10-09 16:02:44
|
Hi everyone, I've been using matplotlib for a while but mostly using the pyplot functions and going as far as changing their initial input parameters. Now I need to make a boxplot and include names on the X axis as opposed to the default numbers. I've searched extensively on the docs and using google but I reached a dead end. So, could someone point me in the direction of how can I change the plot to use names instead of numbers on the x axis (vertical boxplot) or y axis (horizontal boxplot)? Thanks, Renato |
|
From: Yann G. <mat...@al...> - 2009-10-09 15:45:46
|
I applied the patch to the tarball and built. It works perfectly. Your responsiveness is very impressive. Thanks, Yann On 10/09/2009 05:27 PM, Michael Droettboom wrote: > Thanks. This is definitely a bug. I just fixed it in SVN r7858. > > http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=rev&revision=7858 > > > Unfortunately, this requires a recompile. You can build from SVN, or > download the 0.99.1 tarball and manually apply the above patch. > > Mike > > Yann Goudard wrote: >> Hi, >> >> I notice hatch is not drawn correctly when I zoom in axes. >> >> #!/usr/bin/env python >> import matplotlib.pyplot as plt >> from matplotlib.patches import Rectangle >> >> axes = plt.subplot(111) >> axes.add_patch(Rectangle((0, 0), 1, 1, fill=False, hatch="/")) >> plt.show() >> >> Is there a way to fix it ? >> >> Regards, >> >> Yann >> >> >> >> ------------------------------------------------------------------------------ >> >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and >> stay ahead of the curve. Join us from November 9 - 12, 2009. Register >> now! >> http://p.sf.net/sfu/devconference >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Michael D. <md...@st...> - 2009-10-09 15:27:20
|
Thanks. This is definitely a bug. I just fixed it in SVN r7858. http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=rev&revision=7858 Unfortunately, this requires a recompile. You can build from SVN, or download the 0.99.1 tarball and manually apply the above patch. Mike Yann Goudard wrote: > Hi, > > I notice hatch is not drawn correctly when I zoom in axes. > > #!/usr/bin/env python > import matplotlib.pyplot as plt > from matplotlib.patches import Rectangle > > axes = plt.subplot(111) > axes.add_patch(Rectangle((0, 0), 1, 1, fill=False, hatch="/")) > plt.show() > > Is there a way to fix it ? > > Regards, > > Yann > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Yann G. <mat...@al...> - 2009-10-09 15:18:54
|
Hi, I notice hatch is not drawn correctly when I zoom in axes. #!/usr/bin/env python import matplotlib.pyplot as plt from matplotlib.patches import Rectangle axes = plt.subplot(111) axes.add_patch(Rectangle((0, 0), 1, 1, fill=False, hatch="/")) plt.show() Is there a way to fix it ? Regards, Yann |
|
From: Georg B. <Geo...@fr...> - 2009-10-09 14:56:05
|
Hi, I want to make a plot with ordinary subplots, each of which has a second axes set created with twinx(). Now, the second axes are always drawn over the first, but I want the "main" data, which is associated with the left Y axis, to be in front. (If I understand the code correctly, the zorder doesn't help here since it only applies to stuff within one axes set.) I've already tried reversing the order of the two axes in figure.axes, but that results in (apparently) only the first axes being drawn. Is there a way to get this working? thanks, Georg |
|
From: Yann G. <mat...@al...> - 2009-10-09 07:59:01
|
Hi,
I found strange behavior in matplotlib.text.Text.
set_backgroundcolor(self, color) allows to init text background and edge
colors but we can only alter backgroundcolor.
# line 728
def set_backgroundcolor(self, color):
"""
Set the background color of the text by updating the bbox.
.. seealso::
:meth:`set_bbox`
To change the position of the bounding box.
ACCEPTS: any matplotlib color
"""
if self._bbox is None:
self._bbox = dict(facecolor=color, edgecolor=color)
else:
self._bbox.update(dict(facecolor=color))
I think the last line might be like :
self._bbox.update(dict(facecolor=color, edgecolor=color))
I notice it because I use a dark background for axis and texts but I
replace it by a white one when I print figure. With current code, it
remains a dark border arround my texts.
Regards,
Yann
|
|
From: Laurent D. <lau...@gm...> - 2009-10-09 05:50:57
|
Hello, Continuing on my previous email, I'm using this example: http://matplotlib.sourceforge.net/examples/animation/animation_blit_qt4.html def __init__(self): FigureCanvas.__init__(self, Figure()) self.ax = self.figure.add_subplot(111) self.ax.set_position([0.1,0.05,0.5,0.9]) works, but: def __init__(self): FigureCanvas.__init__(self, Figure()) self.ax = self.figure.add_subplot(111) self.ax.set_position([0.1,0.1,0.5,0.9]) is not working L, the region is wrongly blitted and some part of the graph is not restored. I think there is a bug in the refresh of the bounding box or something like this. Using matplotlib 0.99.1.1 python2.5 win32 pyqt4 4.4.3.7 (given with python(x,y) 2.1.17) Laurent |
|
From: Jeff W. <js...@fa...> - 2009-10-09 05:34:21
|
John [H2O] wrote:
> Jeff,
>
> Here's a quick snippet. I've looked at the test.py file provided with the
> basemap examples. What I am unclear on are the different ways in which nx
> and ny are defined. I would like to have this 'automatically' defined, based
> solely on variables from my input object.. say for example a netcdf file
> that has len and lon dimensions defined.
>
John: I don't have time to look at your code right now, but let me just
make some general comments about plotting images on maps. If you want
to use imshow, the data your are plotting must coincide exactly with
your map plot area. So, for example if you want to plot a global
lat/lon grid on a north polar stereographic projection, you have to
interpolate to a rectangular grid in projection coordinates that fits in
the map region. However, in practice I find it's almost never worth
doing this. You can plot the data in the native coordinates on almost
any map projection region using pcolormesh or contourf, Just calculate
the x,y values of the of the data grid, and pass those values along with
the data to either one of those methods. Is there any particular reason
you want to use imshow, instead of pcolormesh or contourf?
-Jeff
> Below is my crude stab at it, but I am clearly having some problems. I guess
> the point is, maybe it's not possible to have a Basemap instance with
> extents beyond the imshow object. Then perhaps I need to make sure that when
> I set up the Basemap instance, I pass the H.outlon0 to llcrnrlon for
> example. But is that necessary?
>
> Thanks!
>
> #!/usr/bin/env python
>
> import matplotlib.pyplot as plt
> from mpl_toolkits.basemap import Basemap
> import numpy as np
>
>
>
> def plot_imshow_custom(H,transform=True ):
> """
> function to automagically plot an mxn array of arbitrary lats/lons
> """
> data = H.data
> print data.shape
>
> m =
> Basemap(projection='npstere',boundinglat=10,lon_0=270,resolution='l')
> fig = plt.figure()
> ax = fig.gca()
>
> print "Preparing to plot %s with dimensions:" % H.name
> print "lon0, numx, dx:"
> print H.outlon0, H.numxgrid, H.dxout
> print "lat0, numy, dy:"
> print H.outlat0, H.numygrid, H.dyout
>
>
> ## set up transformations for the data array
> ## THIS IS WHERE I NEED SOME HELP:
> if m.projection not in ['cyl','merc','mill']:
> lats = np.arange( H.outlat0, ( H.outlat0 + ( H.numygrid*H.dyout ) ),
> H.dyout )[:-1]
> lons = np.arange( H.outlon0, ( H.outlon0 + ( H.numxgrid*H.dxout ) ),
> H.dxout )[:-1]
> data = data[:-1,:-1]
> else:
> lats = np.arange( H.outlat0, ( H.outlat0 + ( H.numygrid*H.dyout ) ),
> H.dyout )
> lons = np.arange( H.outlon0, ( H.outlon0 + ( H.numxgrid*H.dxout ) ),
> H.dxout )
> print data.shape
> ## transform to nx x ny regularly spaced native projection grid
> if transform:
> if m.projection not in ['cyl','merc','mill']:
> dx = 2.*np.pi*m.rmajor/len(lons)
> dy = 2.*np.pi*m.rminor/len(lats)
> else:
> dx = len(lons)
> dy = len(lats)
> nx = int((m.xmax-m.xmin)/dx)+1;
> ny = int((m.ymax-m.ymin)/dy)+1
> print nx
> if nx is 1:
> topodat = data
> else:
> topodat = m.transform_scalar(data,lons,lats,nx,ny)
> else:
> topodat = data
>
>
> ## Get the current axes, and properties for use later
> pos = ax.get_position()
> l, b, w, h = pos.bounds
>
> ## Set up the IMAGE
> colmap = plt.get_cmap('gist_ncar')
> im = m.imshow(topodat,cmap=colmap)
> m.drawcoastlines()
>
> return fig
>
>
> class SuperDict(dict):
> """just so I can use . notation"""
> def __getattr__(self, attr):
> return self[attr]
> def __setattr__(self, attr, value):
> self[attr] = value
>
> if __name__ == "__main__":
>
> H = SuperDict()
> H.name = 'working example'
> H.outlat0 = -90
> H.numygrid = 180
> H.dyout = 1.
> H.outlon0 = -179
> H.numxgrid = 360
> H.dxout = 1.0
> H.data = np.random.rand(H.numygrid,H.numxgrid)
> print H.data.shape
> fig = plot_imshow_custom(H,transform=True)
> plt.show()
> print 'it worked'
> try:
> H.name = 'Not working example'
> H.outlat0 = 40
> H.numygrid = 100
> H.dyout = 0.5
> H.outlon0 = -179
> H.numxgrid = 110
> H.dxout = 0.5
> H.data = np.random.rand(H.numygrid,H.numxgrid)
> fig = plot_imshow_custom(H)
> print 'huh?'
> plt.show()
>
> except:
> print "As I said, it's not working..."
>
>
>
>
> Jeff Whitaker wrote:
>
>> John [H2O] wrote:
>>
>>> I'm trying to 'automate' a few components within basemap. I have a pretty
>>> complicated, and assuredly poorly written, set of functions that allow me
>>> to
>>> 'dynamically' plot a grid of data (lon,lat).
>>>
>>> Here is one section where I try to deal with transforming the data based
>>> on
>>> the projection. 'data' is a grid, often of size 720x360 or 720x180,
>>> representing full globe or hemisphere at 0.5 degree resolution.
>>> 'outlon0',
>>> outlat0', and 'd*out' are the llcrnr coordinates and step. 'transform' is
>>> an
>>> option, that is set to True by default:
>>>
>>> 1680 ## set up transformations for the data array
>>> 1681 if m.projection not in ['cyl','merc','mill']:
>>> 1682 lats = np.arange( outlat0, ( outlat0 + ( numygrid*dyout ) ),
>>> dyout )[:-1]
>>> 1683 lons = np.arange( outlon0, ( outlon0 + ( numxgrid*dxout ) ),
>>> dxout )[:-1]
>>> 1684 data = data[:-1,:-1]
>>> 1685 else:
>>> 1686 lats = np.arange( outlat0, ( outlat0 + ( numygrid*dyout ) ),
>>> dyout )
>>> 1687 lons = np.arange( outlon0, ( outlon0 + ( numxgrid*dxout ) ),
>>> dxout )
>>> 1688
>>> 1689 ## transform to nx x ny regularly spaced native projection grid
>>> 1690 if transform:
>>> 1691 dx = 2.*np.pi*m.rmajor/len(lons)
>>> 1692 nx = int((m.xmax-m.xmin)/dx)+1; ny =
>>> int((m.ymax-m.ymin)/dx)+1
>>> 1693 if nx is 1:
>>> 1694 topodat = data
>>> 1695 else:
>>> 1696 topodat = m.transform_scalar(data,lons,lats,nx,ny)
>>> 1697 else:
>>> 1698 topodat = data
>>>
>>> The problem is, when I use the approach with a 'cyl' grid, then
>>> subsequently
>>> try to draw the lsmask, I get a failure. Is this approach incorrect? I
>>> had
>>> to use the if nx is 1 statement because it was crashing with zero
>>> division
>>> error in some cases.
>>>
>>> Thanks.
>>>
>>>
>> John: Please supply us with a self-contained example triggering the
>> error that we can run.
>>
>> -Jeff
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry® Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9-12, 2009. Register
>> now!
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>>
>
>
|
|
From: Jae-Joon L. <lee...@gm...> - 2009-10-08 16:20:05
|
axes_grid is included in matplotlib (at least from version 0.99), i.e., if you have installed 0.99, you already have axes_grid toolkit. Also, in svn, source for axes_grid toolkits can be found under lib/mpl_toolkits. Regards, -JJ On Thu, Oct 8, 2009 at 11:51 AM, william ratcliff <wil...@gm...> wrote: > Hi, > I think I'm missing something obvious. I'd like to install the axes_grid > toolkit to work on some inset graphs. I can't seem to find it on the trunk > of svn. Where is it living these days? Is there a version that would be > compatible with .99.0? > Thanks, > William > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: william r. <wil...@gm...> - 2009-10-08 15:51:22
|
Hi, I think I'm missing something obvious. I'd like to install the axes_grid toolkit to work on some inset graphs. I can't seem to find it on the trunk of svn. Where is it living these days? Is there a version that would be compatible with .99.0? Thanks, William |
|
From: Laurent D. <lau...@gm...> - 2009-10-08 15:41:02
|
Hello, I've just discovered blitting technique to improve performances. I'm using this example http://matplotlib.sourceforge.net/examples/animation/animation_blit_qt4.html I encounter an issue if instead of using subplot I use add_axes method to hand define where I want my plot. In this case blitting is no more working like if restore_region was not restoring context. def __init__(self): FigureCanvas.__init__(self, Figure()) #self.ax = self.figure.add_subplot(111) self.ax = self.figure.add_axes([0.1,0.1,0.8,0.2]) Any idea why in this case the example given is not working? Cheers, Laurent |
|
From: Laurent D. <LDu...@ma...> - 2009-10-08 15:31:18
|
Hello, I've just discovered blitting technique to improve performances. I'm using this example http://matplotlib.sourceforge.net/examples/animation/animation_blit_qt4. html I encounter an issue if instead of using subplot I use add_axes method to hand define where I want my plot. In this case blitting is no more working like if restore_region was not restoring context... def __init__(self): FigureCanvas.__init__(self, Figure()) #self.ax = self.figure.add_subplot(111) self.ax = self.figure.add_axes([0.1,0.1,0.8,0.2]) Any idea why in this case the example given is not working? Cheers, Laurent |
|
From: Laurent D. <lau...@gm...> - 2009-10-08 11:58:53
|
. Laurent |
|
From: Ernest A. <ead...@gm...> - 2009-10-08 11:53:15
|
1/10/09 @ 12:21 (-0500), thus spake Srivathsan Srinivas: > Hi, > I am trying to plot a graph and color nodes in a loop. So far, the > for-loop I am using can color them. But, I am able to color them using a > single color. I want to color the nodes differently for each iteration of > the for-loop. How do I do that? Say you use matplotlib.cm.Reds_r, then you call Reds_r(N) at each iteration, where N is an integer that increases at each iteration. Reds_r(N) returns a colour specification that then you pass to the plotting function as a 'color' argument. > The above code colors the nodes blue and the edges r. I want to options: > > 1 --- For each iteration, I want the nodes to be colored in diminishing > 2 --- For each iteration, I want a separate coloring of the nodes. For separate colouring of the nodes, you need to draw each node separatedly as far as I know. -- Ernest |
|
From: Jae-Joon L. <lee...@gm...> - 2009-10-08 05:21:44
|
I'm not an axes3d expert and below is from my quick at the code, so there may be better ways. axes3d have w_[xyz]axis attributes, which are responsible for drawing tick, ticklables, and you need to change these to change ticks, etc. While, I think something like w_xaxis.set_ticks should work, currently it fails, which I think is a bug. As a workaround, you have to directly set the ticklocator. For example, "ax.xaxis.set_ticks([-20, 0, 20])" becomes from matplotlib.ticker import FixedLocator locator = FixedLocator([-20, 0, 20]) ax.w_xaxis.set_major_locator(locator) -JJ On Tue, Oct 6, 2009 at 7:07 AM, William Hall <wi...@qu...> wrote: > Does anyone know if it possible to annotate the axes with strings? > > I've tried a hundred combinations of set_xticklabels with and without > set_xticks but absolutely nothing seems to have any effect. > > Perhaps this is a bug? Perhaps labelling 3d axes is not supported? There's > no documentation on this matter and I'm at my wits end - any help is > appreciated. > > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Jae-Joon L. <lee...@gm...> - 2009-10-08 04:57:49
|
It seems that there is no support of hatching in Collection, although
I don't see any reason.
I think the easiest way for now is to create extra patch objects for hatching.
Try something like below.
-JJ
p = ax1.fill_between(x, 0, y1)
p.set_facecolors("none")
from matplotlib.patches import PathPatch
for path in p.get_paths():
p1 = PathPatch(path, fc="none", hatch="/")
ax1.add_patch(p1)
p1.set_zorder(p.get_zorder()-0.1)
On Wed, Oct 7, 2009 at 7:08 AM, Matthew Czesarski
<mat...@gm...> wrote:
> Hi all,
> What would be really useful for me, is to be able to hatch the area filled
> using the fill_between() method, instead of using solid color. Does anybody
> know if this is possible?
> Thanks in advance,
> Matt
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: <Ros...@ga...> - 2009-10-08 04:54:43
|
Hi Listers, I recently installed matplotlib 0.99.1 hoping to use mplot3d. However, when doing 'from mpl_toolkits.mplot3d import Axes3D' python itself crashes. Reinstalling matplotlib 0.98.5 gets everything working fine, without mplot3d, of course. I am running Windows XP, python 2.5.2 and numpy 1.2.1. From the installation instructions I think I have all the prerequisites. Has anyone seen behaviour like this? Ross Wilson |
|
From: Chengkun H. <hu...@gm...> - 2009-10-07 23:39:38
|
Hi all,
I am just started to use matplotlib and have a question about
using blit method to animate plots. I wrote something like this to
show the initial plot (other part of the code not shown):
....
l1, = p1.plot(lineout, animated=True)
p1.set_xlabel(xlabel)
p1.axis(data_range)
plt.draw()
background = canvas.copy_from_bbox(p1.bbox)
p1.draw_artist(l1)
canvas.blit(p1.bbox)
...
This works and showes the first plot, however, zooming and panning
using the toolbar will make plot disappear (only empty background
left). So I wonder if there is a way to make zooming and panning work
with the blit method.
Thank you!
Chengkun
|
|
From: John [H2O] <was...@gm...> - 2009-10-07 23:10:21
|
Jeff,
Here's a quick snippet. I've looked at the test.py file provided with the
basemap examples. What I am unclear on are the different ways in which nx
and ny are defined. I would like to have this 'automatically' defined, based
solely on variables from my input object.. say for example a netcdf file
that has len and lon dimensions defined.
Below is my crude stab at it, but I am clearly having some problems. I guess
the point is, maybe it's not possible to have a Basemap instance with
extents beyond the imshow object. Then perhaps I need to make sure that when
I set up the Basemap instance, I pass the H.outlon0 to llcrnrlon for
example. But is that necessary?
Thanks!
#!/usr/bin/env python
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
import numpy as np
def plot_imshow_custom(H,transform=True ):
"""
function to automagically plot an mxn array of arbitrary lats/lons
"""
data = H.data
print data.shape
m =
Basemap(projection='npstere',boundinglat=10,lon_0=270,resolution='l')
fig = plt.figure()
ax = fig.gca()
print "Preparing to plot %s with dimensions:" % H.name
print "lon0, numx, dx:"
print H.outlon0, H.numxgrid, H.dxout
print "lat0, numy, dy:"
print H.outlat0, H.numygrid, H.dyout
## set up transformations for the data array
## THIS IS WHERE I NEED SOME HELP:
if m.projection not in ['cyl','merc','mill']:
lats = np.arange( H.outlat0, ( H.outlat0 + ( H.numygrid*H.dyout ) ),
H.dyout )[:-1]
lons = np.arange( H.outlon0, ( H.outlon0 + ( H.numxgrid*H.dxout ) ),
H.dxout )[:-1]
data = data[:-1,:-1]
else:
lats = np.arange( H.outlat0, ( H.outlat0 + ( H.numygrid*H.dyout ) ),
H.dyout )
lons = np.arange( H.outlon0, ( H.outlon0 + ( H.numxgrid*H.dxout ) ),
H.dxout )
print data.shape
## transform to nx x ny regularly spaced native projection grid
if transform:
if m.projection not in ['cyl','merc','mill']:
dx = 2.*np.pi*m.rmajor/len(lons)
dy = 2.*np.pi*m.rminor/len(lats)
else:
dx = len(lons)
dy = len(lats)
nx = int((m.xmax-m.xmin)/dx)+1;
ny = int((m.ymax-m.ymin)/dy)+1
print nx
if nx is 1:
topodat = data
else:
topodat = m.transform_scalar(data,lons,lats,nx,ny)
else:
topodat = data
## Get the current axes, and properties for use later
pos = ax.get_position()
l, b, w, h = pos.bounds
## Set up the IMAGE
colmap = plt.get_cmap('gist_ncar')
im = m.imshow(topodat,cmap=colmap)
m.drawcoastlines()
return fig
class SuperDict(dict):
"""just so I can use . notation"""
def __getattr__(self, attr):
return self[attr]
def __setattr__(self, attr, value):
self[attr] = value
if __name__ == "__main__":
H = SuperDict()
H.name = 'working example'
H.outlat0 = -90
H.numygrid = 180
H.dyout = 1.
H.outlon0 = -179
H.numxgrid = 360
H.dxout = 1.0
H.data = np.random.rand(H.numygrid,H.numxgrid)
print H.data.shape
fig = plot_imshow_custom(H,transform=True)
plt.show()
print 'it worked'
try:
H.name = 'Not working example'
H.outlat0 = 40
H.numygrid = 100
H.dyout = 0.5
H.outlon0 = -179
H.numxgrid = 110
H.dxout = 0.5
H.data = np.random.rand(H.numygrid,H.numxgrid)
fig = plot_imshow_custom(H)
print 'huh?'
plt.show()
except:
print "As I said, it's not working..."
Jeff Whitaker wrote:
>
> John [H2O] wrote:
>> I'm trying to 'automate' a few components within basemap. I have a pretty
>> complicated, and assuredly poorly written, set of functions that allow me
>> to
>> 'dynamically' plot a grid of data (lon,lat).
>>
>> Here is one section where I try to deal with transforming the data based
>> on
>> the projection. 'data' is a grid, often of size 720x360 or 720x180,
>> representing full globe or hemisphere at 0.5 degree resolution.
>> 'outlon0',
>> outlat0', and 'd*out' are the llcrnr coordinates and step. 'transform' is
>> an
>> option, that is set to True by default:
>>
>> 1680 ## set up transformations for the data array
>> 1681 if m.projection not in ['cyl','merc','mill']:
>> 1682 lats = np.arange( outlat0, ( outlat0 + ( numygrid*dyout ) ),
>> dyout )[:-1]
>> 1683 lons = np.arange( outlon0, ( outlon0 + ( numxgrid*dxout ) ),
>> dxout )[:-1]
>> 1684 data = data[:-1,:-1]
>> 1685 else:
>> 1686 lats = np.arange( outlat0, ( outlat0 + ( numygrid*dyout ) ),
>> dyout )
>> 1687 lons = np.arange( outlon0, ( outlon0 + ( numxgrid*dxout ) ),
>> dxout )
>> 1688
>> 1689 ## transform to nx x ny regularly spaced native projection grid
>> 1690 if transform:
>> 1691 dx = 2.*np.pi*m.rmajor/len(lons)
>> 1692 nx = int((m.xmax-m.xmin)/dx)+1; ny =
>> int((m.ymax-m.ymin)/dx)+1
>> 1693 if nx is 1:
>> 1694 topodat = data
>> 1695 else:
>> 1696 topodat = m.transform_scalar(data,lons,lats,nx,ny)
>> 1697 else:
>> 1698 topodat = data
>>
>> The problem is, when I use the approach with a 'cyl' grid, then
>> subsequently
>> try to draw the lsmask, I get a failure. Is this approach incorrect? I
>> had
>> to use the if nx is 1 statement because it was crashing with zero
>> division
>> error in some cases.
>>
>> Thanks.
>>
> John: Please supply us with a self-contained example triggering the
> error that we can run.
>
> -Jeff
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register
> now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
View this message in context: http://www.nabble.com/basemap%2C-transform_scalar-question-tp25649437p25795985.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Ann N. <Ann...@no...> - 2009-10-07 17:13:42
|
Thanks, Matthias, Your code suggestion works. I was aware of xlim but must not have used it correctly, before contacting matplotlib-users. I think I tried set_xlim, but did not use the get_xlim function. With your code added, the minor tick mark locations line up correctly too. Thanks again, Ann Matthias Michler wrote: > Hi Ann, > > I'm not sure I understood correctly, but maybe it is useful to change the > xlimits slightly, e.g. datetime(1998,4,20,0) instead of (the default value in > this case) datetime(1998,4,20,1): > > ax.set_xlim( date2num(datetime(1998,4,20,0)), ax.get_xlim()[1] ) > > >> Also the minor tick marks do not look right, especially the ones just to >> the right of each x-axis label. >> > I cannot see these unexpected behaviour of the tick marks (as in your png) > with current svn, but I'm not sure this is the reason. > > Kind regards, > Matthias > > On Tuesday 06 October 2009 22:15:25 Ann Newman wrote: > >> I am plotting time-series 1-minute cadence data for specific >> multiple-day validation periods. >> >> Sometimes the data have a gap between the start of the validation period >> and the start of the data. Attached is a stand-alone Python script that >> demonstrates the problem, along with the plot that the script produces. >> >> April 20 is the start of the validation period. I want 04-20 to appear >> at the plot origin. This does not happen unless either the model or >> observed dictionary contain a key/value pair for 1998,4,20,0. >> I tried adding datetime(1998,4,20,0):None to one or both >> dictionaries, but it is ignored. >> >> Also the minor tick marks do not look right, especially the ones just to >> the right of each x-axis label. >> >> Do you have any suggestions? >> >> Thanks, >> Ann >> >> I am working on a Windows PC; O/S is Windows XP Professional, Version >> 2002, Service Pack 3. >> I am running matplotlib, version '0.99.0' which I obtained from the >> matplotlib Sourceforge site. >> I have not customized matplotlibrc. >> I am running python version 2.6.2. >> Attached is output.txt, the result of running my script with a >> verbose-helpful >> > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |