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




Showing 5 results of 5

From: Jeff W. <js...@fa...> - 2009年03月12日 23:05:26
Hatch, Sara J wrote:
>
> Matplotlib Folks,
>
> I tried to use the orthographic projection in the basemap toolkit and 
> I’m finding that the parallel lines are not behaving correctly, i.e., 
> there are horizontal lines connecting the left and right side of the 
> map boundary where a curved latitude line intersects the map boundary. 
> I’ve included a sample script below and a figure illustrating the problem.
>
> import pylab
>
> import mpl_toolkits.basemap as basemap
>
> ortho = 
> basemap.Basemap(projection='ortho',lon_0=0,lat_0=50,rsphere=1737.4)
>
> ortho.drawparallels(pylab.arange(-90,90,30))
>
> ortho.drawmeridians(pylab.arange(0,360,30))
>
> ortho.drawmapboundary(fill_color='w')
>
> In addition, how do I change the x/y coordinates the center of the 
> projection to be (0,0)? With the above code, the center of the 
> bounding circle is at (1737.4,1737.4).
>
> Thanks for the help,
>
> Sara
>
Sara: If you take out the rsphere=1734.4 (thereby using the default 
value of 6370997), the jumpy lines go away. rsphere=1734.4 means assume 
the earth is a perfect sphere with a radius of 1734.4 meters. That's an 
awfully small earth - I think the jumpy lines are a result of roundoff 
errors in the map projection calculation for very small spheres. Still, 
that shouldn't happen, so I will look into it.
Regarding the x/y coordinate of the middle of the plot - Basemap assigns 
the lower left corner of the map projection region an x/y value of 0,0 
for most map projections.
-Jeff
From: Gökhan S. <gok...@gm...> - 2009年03月12日 15:52:40
Voila,
This was what I have been looking for exactly.
Thanks for the solution.
PS: I have edited the related wiki page reflecting this method, as well:
http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label
Gökhan
On Thu, Mar 12, 2009 at 10:28 AM, Sebastian Krieger <seb...@io...>wrote:
> I think now I got what you want. Simply put the label on the middle
> subplot. If it's too big it will span accross the other plots.
>
> import pylab
>
> figprops = dict(figsize=(8., 8. / 1.618),
> dpi=128) # Figure properties
> adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93, wspace=0.2,
>
> hspace=0.2) # Subplot
> properties
>
> fig =
> pylab.figure(**figprops) #
> New figure
> fig.subplots_adjust(**adjustprops)
> # Tunes the subplot layout
>
> ax = fig.add_subplot(3, 1, 1)
> bx = fig.add_subplot(3, 1, 2, sharex=ax, sharey=ax)
> cx = fig.add_subplot(3, 1, 3, sharex=ax, sharey=ax)
>
> pylab.setp(ax.get_xticklabels(), visible=False)
> pylab.setp(bx.get_xticklabels(), visible=False)
>
> bx.set_ylabel('This is a long label shared among more axes', fontsize=14)
> cx.set_xlabel('And a shared x label', fontsize=14)
>
> Cheers,
> Sebastian
>
> Gökhan SEVER wrote:
>
> Hello Sebastian,
>
> Not sure I could create a same-axes ylabels subplots similar to the one
> that is shown on the given screenshot with your code. (
> http://img11.imageshack.us/img11/8793/subplots.png)
>
> Sorry haven't managed to make LateX work on my matplotlib outputs :(
>
> Thanks for your time and consideration.
>
> Gökhan
>
>
From: Sebastian K. <seb...@io...> - 2009年03月12日 14:29:36
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I think now I got what you want. Simply put the label on the middle
subplot. If it's too big it will span accross the other plots.<br>
<blockquote><tt>import pylab</tt><br>
 <br>
 <tt>figprops = dict(figsize=(8., 8. / 1.618),
dpi=128)               # Figure properties</tt><br>
 <tt>adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93,
wspace=0.2,</tt><br>
 <tt>         
hspace=0.2)                         # Subplot
properties</tt><br>
 <br>
 <tt>fig =
pylab.figure(**figprops)                         
# New figure</tt><br>
 <tt>fig.subplots_adjust(**adjustprops)                       
# Tunes the subplot layout</tt><br>
 <br>
 <tt>ax = fig.add_subplot(3, 1, 1)</tt><br>
 <tt>bx = fig.add_subplot(3, 1, 2, sharex=ax, sharey=ax)</tt><br>
 <tt>cx = fig.add_subplot(3, 1, 3, sharex=ax, sharey=ax)</tt><br>
 <br>
 <tt>pylab.setp(ax.get_xticklabels(), visible=False)</tt><br>
 <tt>pylab.setp(bx.get_xticklabels(), visible=False)</tt><br>
 <br>
 <tt>bx.set_ylabel('This is a long label shared among more axes',
fontsize=14)</tt><br>
 <tt>cx.set_xlabel('And a shared x label', fontsize=14)</tt><br>
</blockquote>
Cheers,<br>
Sebastian<br>
<br>
Gökhan SEVER wrote:
<blockquote
 cite="mid:49d...@ma..."
 type="cite">Hello Sebastian,<br>
 <br>
Not sure I could create a same-axes ylabels subplots similar to the one
that is shown on the given screenshot with your code. (<a
 moz-do-not-send="true"
 href="http://img11.imageshack.us/img11/8793/subplots.png">http://img11.imageshack.us/img11/8793/subplots.png</a>)<br>
 <br>
Sorry haven't managed to make LateX work on my matplotlib outputs :(<br>
 <br>
Thanks for your time and consideration.<br>
 <br>
Gökhan<br>
</blockquote>
</body>
</html>
From: Gökhan S. <gok...@gm...> - 2009年03月12日 04:32:20
Hello Sebastian,
Not sure I could create a same-axes ylabels subplots similar to the one that
is shown on the given screenshot with your code. (
http://img11.imageshack.us/img11/8793/subplots.png)
Sorry haven't managed to make LateX work on my matplotlib outputs :(
Thanks for your time and consideration.
Gökhan
On Wed, Mar 11, 2009 at 8:49 AM, Sebastian Krieger <seb...@io...>wrote:
> Hi Gökhan et al,
>
> I hope the following code might help you out and show you the basic idea of
> sharing the same x and y axis over several subplots. I've made a plot with 2
> x 2 subplots sharing both x and y axis and showing only the labels at the
> left and the labels at the bottom.
>
> import pylab
>
> figprops = dict(figsize=(8., 8. / 1.618),
> dpi=128) # Figure properties
> adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93, wspace=0.08,
>
> hspace=0.1) # Subplot
> properties
>
> fig =
> pylab.figure(**figprops) #
> New figure
> fig.subplots_adjust(**adjustprops)
> # Tunes the subplot layout
>
> ax = fig.add_subplot(2, 2, 1)
> bx = fig.add_subplot(2, 2, 2, sharex=ax, sharey=ax)
> cx = fig.add_subplot(2, 2, 3, sharex=ax, sharey=ax)
> dx = fig.add_subplot(2, 2, 4, sharex=ax, sharey=ax)
>
> ax.plot(X1, Y1, 'k-')
> bx.plot(X2, Y2, 'k-')
> cx.plot(X3, Y3, 'k-')
> dx.plot(X4, Y4, 'k-')
>
> pylab.setp(ax.get_xticklabels(), visible=False)
> pylab.setp(bx.get_xticklabels(), visible=False)
> pylab.setp(bx.get_yticklabels(), visible=False)
> pylab.setp(dx.get_yticklabels(), visible=False)
>
> You can make the subplots come closer by changing the *wspace* and *hspace
> * entries in the *adjustprops* dictionary.
>
> Cheers,
> Sebastian
>
>
> Gökhan SEVER wrote:
>
> I don't know how to do this in matplotlib. Can you give an example?
>
> Chip,
>
> I tried your method but didn't work for me :(
>
> So far, my best approach is use some GIMP tricks on transparent canvas.
> With these improvements I am finishing my first official poster.
>
> Thanks.
> Gökhan
>
>
From: per f. <per...@gm...> - 2009年03月12日 03:47:31
hi all,
is there a way to plot the results of hierarchical clustering as a
dendrogram on top and to the sides of a heatmap matrix? for example, like
this figure:
http://www.egms.de/figures/meetings/gmds2006/06gmds075.f1.png
any examples of how to do this in matplotlib would be greatly appreciated.
thank you.
1 message has been excluded from this view by a project administrator.

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 によって変換されたページ (->オリジナル) /