SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(4)
3
(16)
4
(4)
5
(15)
6
(16)
7
(6)
8
(4)
9
(9)
10
(5)
11
(8)
12
(14)
13
(19)
14
(21)
15
(8)
16
(6)
17
(10)
18
(22)
19
(15)
20
(7)
21
(21)
22
(1)
23
(6)
24
(16)
25
(12)
26
(11)
27
(27)
28
(7)
29
30
(4)
31
(5)





Showing 5 results of 5

From: bhargav v. <coo...@gm...> - 2011年01月31日 17:58:40
Hello 
I am using matplotlib 1.0.0 version. and would like to use the imshow() to display my 2D image [512 X 1024]
so when I use the imshow() command as 
imshow(array,origin='lower',interpolation='bilinear')
xlables - [0,100,200,400,500]
ylabels - [0,200,400,600,800,1000]
which is correct as by default the imshow will set the grid number as the labels.
Now, physical size of this grid is [52 X 152] .... so to get that values, I use the following command
imshow(array,origin='lower',interpolation='bilinear',extend=[0.0,52.0,0.0,152.0])
and the image that I obtain is not correct. 
By not correct I mean that the important features in the image are not at the positions where I expect them to be while transforming from [512 X 1024] grid to
[52 X 152] physical grid. 
I presume this could be due to the fact that the extent just divides the axis in uniform grid ... however my grid is not uniform. 
But I do know the pixel width (dx and dy) at each position.
I have tried to use pcolor but somehow the pcolor() is too slow for such a large grid.
Can anyone help me in getting the X, and Y values correct on the axes , using imshow() and complete grid information, when I transform from [512 X 1024] grid to [52 X 152] physical grid.
Cheers
Bhargav Vaidya.
From: johanngoetz <jg...@uc...> - 2011年01月31日 16:05:39
Thanks guys! This is exactly what I was looking for. The axes_grid1 toolkit
works like a charm. I have attached a revised version of the example I had
before with a few minor modifications and some descriptive text at the top.
Is there a standard way for non-developers (i.e. users) to contribute
examples like these?
Thanks again!
http://old.nabble.com/file/p30807907/grid_histogram.py grid_histogram.py 
http://old.nabble.com/file/p30807907/grid_histogram.png 
-- 
View this message in context: http://old.nabble.com/zoomed-copy-of-axis-for-grid-of-subplots-tp30748088p30807907.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jeff W. <js...@fa...> - 2011年01月31日 13:08:27
On 1/30/11 6:59 PM, Peter Smale wrote:
> Hi,
> I am using Basemap 1.0 and matplotlib 1.0 on Ubuntu 10.10. I would like
> to use the Hammer projection from the Basemap toolkit but when I use
>
> m = Basemap(resolution='c',projection='hammer',lon_0=180)
>
> I get an error (shown below).
>
> Does anyone know where the Hammer has gone?
>
> Thanks,
> Peter
Peter: hammer was added after 1.0.0 was released - so you have to 
update from svn to get it. I am planning on releasing 1.0.1 soon (in the 
next week or so).
-Jeff
>
>
> Traceback (most recent call last):
> File "md_sinPlot.py", line 37, in<module>
> m = Basemap(resolution='c',projection='hammer',lon_0=180)
> File
> "/usr/local/lib/python2.6/dist-packages/mpl_toolkits/basemap/__init__.py",
> line 700, in __init__
> raise ValueError(_unsupported_projection % projection)
> ValueError: 'hammer' is an unsupported projection.
> The supported projections are:
> aeqd Azimuthal Equidistant
> poly Polyconic
> gnom Gnomonic
> moll Mollweide
> tmerc Transverse Mercator
> nplaea North-Polar Lambert Azimuthal
> gall Gall Stereographic Cylindrical
> mill Miller Cylindrical
> merc Mercator
> stere Stereographic
> npstere North-Polar Stereographic
> geos Geostationary
> nsper Near-Sided Perspective
> vandg van der Grinten
> laea Lambert Azimuthal Equal Area
> mbtfpq McBryde-Thomas Flat-Polar Quartic
> sinu Sinusoidal
> spstere South-Polar Stereographic
> lcc Lambert Conformal
> npaeqd North-Polar Azimuthal Equidistant
> eqdc Equidistant Conic
> cyl Cylindrical Equidistant
> omerc Oblique Mercator
> aea Albers Equal Area
> spaeqd South-Polar Azimuthal Equidistant
> ortho Orthographic
> cass Cassini-Soldner
> splaea South-Polar Lambert Azimuthal
> robin Robinson
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a 49ドル USD value)!
> Finally, a world-class log management solution at an even better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Jae-Joon L. <lee...@gm...> - 2011年01月31日 07:05:54
Here is the axes_grid1 version. I only attach the *axins* part.
It is not identical to your original example and have difference scales.
-JJ
ax1 = ax[ybins-1,1]
from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes, \
 mark_inset
axins = zoomed_inset_axes(parent_axes=ax1, zoom=2, loc=8,
 bbox_to_anchor=(0.5, 0.),
 bbox_transform=ax1.transAxes,
 axes_kwargs=dict(sharex=ax1, sharey=ax1),
 borderpad=-1.5, #padding in fraction of font size
 )
pp, p1, p2 = mark_inset(parent_axes=ax1, inset_axes=axins, loc1=3, loc2=4.,
 linestyle="dotted")
pp.set_visible(False)
axins.axesPatch.set_alpha(0.)
# we want to draw the bottom spine only
axins.set_frame_on(True)
axins.spines['top'].set_visible(False)
axins.spines['left'].set_visible(False)
axins.spines['right'].set_visible(False)
# don't draw the y axis ticks or labels
axins.set_yticks([])
axins.set_yticklabels([])
# only draw the bottom (x) axes
axins.xaxis.set_ticks_position('bottom')
axins.xaxis.set_label_position('bottom')
axins.set_xlabel('z-coordinate')
On Mon, Jan 31, 2011 at 2:08 AM, Benjamin Root <ben...@ou...> wrote:
> On Monday, January 24, 2011, johanngoetz <jg...@uc...> wrote:
>>
>> Hello,
>> A common task I have is to histogram one variable of a multidimensional
>> dataset as a function of two (or more) variables. I have attached an example
>> which shows exactly what I would like to do.
>>
>> The problem I would like to solve is the zoomed in x-axis which is the last
>> part of the script attached. I start by copying one of the subplots with
>> Axes.twiny() and proceed to adjust it and label it. The results are quite
>> nice but as soon as I start adjusting the plotted window or any of the
>> subplot spacing parameters, this "copy of an axis" does not transform
>> properly. Could anyone make a suggestion as to which transformations I
>> should use to shift and zoom the new axes? Or perhaps there is a better
>> method for drawing a zoomed in version of an axis?
>>
>> I would like to submit this to the examples/gallery page but feel that these
>> details need to be addressed, and I am not sure I know how to fix them.
>> Hopefully, I have commented this example enough that someone could follow
>> what I am doing.
>>
>> Thank you,
>> Johann
>>
>> http://old.nabble.com/file/p30748088/grid_plot.png
>>
>> http://old.nabble.com/file/p30748088/grid_plot.py grid_plot.py
>>
>>
>> --
>> View this message in context: http://old.nabble.com/zoomed-copy-of-axis-for-grid-of-subplots-tp30748088p30748088.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Special Offer-- Download ArcSight Logger for FREE (a 49ドル USD value)!
>> Finally, a world-class log management solution at an even better price-free!
>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
>> February 28th, so secure your free ArcSight Logger TODAY!
>> http://p.sf.net/sfu/arcsight-sfd2d
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
> Have you checked out the axes_grid1 toolkit? I have seen some neat
> features there such as zoomed in plots and such. Maybe it could help
> you?
>
> Ben Root
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a 49ドル USD value)!
> Finally, a world-class log management solution at an even better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Peter S. <pet...@gm...> - 2011年01月31日 01:59:33
Hi,
I am using Basemap 1.0 and matplotlib 1.0 on Ubuntu 10.10. I would like 
to use the Hammer projection from the Basemap toolkit but when I use
m = Basemap(resolution='c',projection='hammer',lon_0=180)
I get an error (shown below).
Does anyone know where the Hammer has gone?
Thanks,
Peter
Traceback (most recent call last):
 File "md_sinPlot.py", line 37, in <module>
 m = Basemap(resolution='c',projection='hammer',lon_0=180)
 File 
"/usr/local/lib/python2.6/dist-packages/mpl_toolkits/basemap/__init__.py", 
line 700, in __init__
 raise ValueError(_unsupported_projection % projection)
ValueError: 'hammer' is an unsupported projection.
The supported projections are:
 aeqd Azimuthal Equidistant
 poly Polyconic
 gnom Gnomonic
 moll Mollweide
 tmerc Transverse Mercator
 nplaea North-Polar Lambert Azimuthal
 gall Gall Stereographic Cylindrical
 mill Miller Cylindrical
 merc Mercator
 stere Stereographic
 npstere North-Polar Stereographic
 geos Geostationary
 nsper Near-Sided Perspective
 vandg van der Grinten
 laea Lambert Azimuthal Equal Area
 mbtfpq McBryde-Thomas Flat-Polar Quartic
 sinu Sinusoidal
 spstere South-Polar Stereographic
 lcc Lambert Conformal
 npaeqd North-Polar Azimuthal Equidistant
 eqdc Equidistant Conic
 cyl Cylindrical Equidistant
 omerc Oblique Mercator
 aea Albers Equal Area
 spaeqd South-Polar Azimuthal Equidistant
 ortho Orthographic
 cass Cassini-Soldner
 splaea South-Polar Lambert Azimuthal
 robin Robinson

Showing 5 results of 5

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /