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

Showing 7 results of 7

From: Gökhan S. <gok...@gm...> - 2010年04月22日 21:54:49
On Thu, Apr 22, 2010 at 4:44 PM, Carlos Grohmann
<car...@gm...>wrote:
> Hi all,
>
> I'm getting this weird behavior of legend. I always get two symbols in
> front of the labels, instead of one.
> Did anyone experienced this before?
>
> I'm working with MPL in a WxPython app.
>
> code snippet:
>
>
> [code]
> for i in range(len(self.idxPlan)):
> x = self.PeigenList[i][14] + (self.PeigenList[i][15] / 2)
> y = self.PeigenList[i][15] * sqrt3_2
> axes.plot(x,y, self.PProps[i][3], c=self.PProps[i][2],
> ms=self.PProps[i][4],label=self.Pname[i])
>
> axes.legend(bbox_to_anchor=(0.85, 0.75), loc=2,
> prop=FontProperties(size='small'))
>
> axes.set_xlim(-0.1,1.2)
> axes.set_ylim(-0.1,1.2)
> self.dataCanvas.draw()
>
> [\code]
>
>
> tks
> --
> Prof. Carlos Henrique Grohmann - Geologist D.Sc.
> Institute of Geosciences - Univ. of São Paulo, Brazil
> http://www.igc.usp.br/pessoais/guano
> Linux User #89721
> ________________
> Can’t stop the signal.
>
Hi,
Try using numpoints keyword:
plt.legend(numpoints=1)
-- 
Gökhan
From: Carlos G. <car...@gm...> - 2010年04月22日 21:44:40
Hi all,
I'm getting this weird behavior of legend. I always get two symbols in
front of the labels, instead of one.
Did anyone experienced this before?
I'm working with MPL in a WxPython app.
code snippet:
[code]
 for i in range(len(self.idxPlan)):
 x = self.PeigenList[i][14] + (self.PeigenList[i][15] / 2)
 y = self.PeigenList[i][15] * sqrt3_2
 axes.plot(x,y, self.PProps[i][3], c=self.PProps[i][2],
ms=self.PProps[i][4],label=self.Pname[i])
 axes.legend(bbox_to_anchor=(0.85, 0.75), loc=2,
prop=FontProperties(size='small'))
 axes.set_xlim(-0.1,1.2)
 axes.set_ylim(-0.1,1.2)
 self.dataCanvas.draw()
[\code]
tks
-- 
Prof. Carlos Henrique Grohmann - Geologist D.Sc.
Institute of Geosciences - Univ. of São Paulo, Brazil
http://www.igc.usp.br/pessoais/guano
Linux User #89721
________________
Can’t stop the signal.
From: Gökhan S. <gok...@gm...> - 2010年04月22日 17:29:01
Hello,
Consider my simple test case:
import matplotlib.pyplot as plt
fp = plt.figure()
ax1 = fp.add_subplot(4,1,1)
ax1.plot(range(10))
ax2 = fp.add_subplot(4,1,2)
ax2.plot(range(10))
ax1.xaxis.set_major_locator (plt.NullLocator ())
ax3 = fp.add_subplot(4,1,3)
ax3.plot(range(10))
# Can't turn off
ax3.xaxis.set_major_locator (plt.NullLocator ())
ax4 = fp.add_subplot(4,1,4, sharex=ax3)
ax4.plot(range(10))
# Turn-off both ax3 and ax4
#ax3.xaxis.set_major_locator (plt.NullLocator ())
plt.show()
When I share x-axis in between two plots I can't turn-off one axis' major
ticks. Depends on the location of the function call it either turn nothing
or all. Is it intended or a mal-functioning? (Shared axis is for my screen
view, I can live without it by turning off sharex option since it won't make
any difference for the final saved figures.)
Thanks.
-- 
Gökhan
From: Alan G I. <ala...@gm...> - 2010年04月22日 15:54:22
If I rotate an axes3D instance with a zlabel
far enough so that the ticks and label "switch sides",
but so that the xlabel and ylabel remain at the bottom,
then the zlabel does not rotate 180 degrees,
as it should to look right. (If I then tilt it so
that the xlabel and the ylabel move to the top,
it does the necessary rotation.)
Alan Isaac
From: Gökhan S. <gok...@gm...> - 2010年04月22日 15:03:58
On Thu, Apr 22, 2010 at 3:42 AM, Matthias Michler
<Mat...@gm...>wrote:
> Hi Gökhan,
>
> Just to make one point clear to me. Do you agree that the following is the
> expected behavior of your suggestion to use
> event.inaxes.grid(which='minormajor') after 'g'?
>
> If only the major tick grid lines are shown and the user presses 'g' the
> major
> tick lines are removed and the minor tick lines are shown, because calling
> Axes.grid with the default b=None toggles the state of plotting grid lines.
> Here this means that the minor tick grid lines are switched from being not
> shown to being shown and the major tick lines change vice versa.
>
> If you agree that this is the expected behavior of your suggestion, do you
> think this is a useful behavior?
>
> Kind regards,
> Matthias
>
Hi again,
With grid state initially off I could get what I really wanted with "g"
toggling after setting in backend_bases.py
event.inaxes.grid(which='majorminor)
It does exactly what it supposed to do -toggle visible grids. See my figure
for a clearer description:
http://img249.imageshack.us/img249/1464/gridimage.png
The top-left figure has major-minor grids enabled in log-log view. This
creates not a pretty image --neither on screen nor when I save the image as
png or pdf. Top-right is clear since it is spaced linearly. The last figure
I toggled with "g" key. It was originally like the first figure on the
screen. I realize also that grid accept alpha keyword, however I couldn't
get a satisfying result out of that either. For the time being I will go
with full-off grids for my step plots.
With this said, I still think event.inaxes.grid(which='majorminor) should be
checked-in since it is the right behavior for full grid toggling. That's
what toggling is about right? Either all or none --we don't want gray areas.
>
-- 
Gökhan
From: Gökhan S. <gok...@gm...> - 2010年04月22日 14:47:41
On Thu, Apr 22, 2010 at 3:25 AM, Matthias Michler
<Mat...@gm...>wrote:
> Hi Gökhan,
>
> with the attached test.py I generated the attached files 'pic?.png' and I'm
> sorry, I don't get the problem. For me ax.grid(False, which='majorminor')
> removes major and minor ticks on x- and y-axis.
>
> Maybe I changed something additionally in my svn (rev 8242) and therefore
> get
> the expected behavior. But unfortunately I cannot test it today.
>
> Kind regards,
> Matthias
The problem was on my side Matthias. I had enabled grid=True in my
matplotlibrc file. Turned it off and I get the same behavior as you get.
Thanks for providing the script and comments.
-- 
Gökhan
From: Michiel de H. <mjl...@ya...> - 2010年04月22日 10:56:38
Actually which backend are you using? I'd like to try this to see what happens if show() is called more than once.
--Michiel.
--- On Tue, 4/20/10, Antony Lee <ant...@en...> wrote:
That would be a solution, indeed. However, is there really no way of coming back to a pre-plt.show() state once all windows are closed? What kind of irreversible things does plt.show() do?
 
2 messages has been excluded from this view by a project administrator.

Showing 7 results of 7

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