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



Showing 5 results of 5

From: John H. <jdh...@ac...> - 2005年11月19日 13:40:35
>>>>> "Christian" == Christian David Ott <chr...@gm...> writes:
 Christian> Hi, sorry about my previous e-mail. I have now tried
 Christian> the same with 0.85. The tick marks are now by default
Yep, the axisbelow property was just added in 0.85 and this controls
whether the ticks and grid lines are drawn above or below your data
lines.
 Christian> on top of the data graphs while the axes lines (please
 Christian> correct my vocabulary usage here, axes lines = figure
 Christian> frame?) are still below.
I see the source of our previous confusion -- matplotlib has a figure
patch and an axes patch. The figure patch controls the backgroud of
the entire figure canvas and the frame of this borders your window or
paper. The axes patch is the thing surrounding the subplot/axes (eg
the white area where your data are). I think in your previous emails
when you referred to the "figure frame" you meant the axes frame. In
which case you would use subplot(111, frameon=False)
 Christian> To get the figure frame drawn on top of everything, one
 Christian> has to modify axes.draw. Namely, one adds to
 Christian> these 4 lines:
 Christian> if self.axison: if self._frameon:
 Christian> self.axesPatch.set_fill(False)
 Christian> self.axesPatch.draw(renderer)
So basically, you want a second draw of the axespatch edge over the
ticks. Could you post a script w/o these changes that shows the
undesirable effect, so I can see better what the problem is. I worry
that doing two draws of the axes patch, one w/ the fill first and one
w/o the fill later will screw up the alpha channel of the edgecolor of
the axes patch. Albeit a corner case.
JDH
From: Christian D. O. <chr...@gm...> - 2005年11月19日 12:45:11
Hi,
sorry about my previous e-mail. I have now tried the same with 0.85.
The tick marks are now by default on top of the data graphs while the
axes lines (please correct my vocabulary usage here, axes lines =3D
figure frame?) are still below.
To get the figure frame drawn on top of everything, one
has to modify axes.draw. Namely, one adds to
 if not self._axisbelow:
 if self.axison and not inframe:
 self.xaxis.draw(renderer)
 self.yaxis.draw(renderer)
these 4 lines:
 if self.axison:
 if self._frameon:
 self.axesPatch.set_fill(False)
 self.axesPatch.draw(renderer)
. Also, one has to set gca.set_axisbelow(False) for the if block
to be executed.
The additional code draws another figure frame, this time without
filling, on top of the previous one and the data graphs.
- Christian
On 11/19/05, Christian David Ott wrote:
> Hi,
>
> using the PS Backend and matplotlib 0.82 with python 2.3.5 I have the
> problem that my graphs typically show up on top of the axes lines (the
> figure frame) and tick marks. However, for a journal quality figure, I
> need the axes and the tick marks to be on top of the graph(s).
>
> I looked through the archives and found below e-mail. Has there been
> any progress in fixing this? Has Michael Brady submitted a patch?
>
> Thanks.
>
> - Christian
>
>
From: Christian K. <ck...@ho...> - 2005年11月19日 10:46:11
John Hunter wrote:
>>>>>>"Christian" == Christian Kristukat <ck...@ho...> writes:
> 
> 
> Christian> I tried that before. It gives a filled white frame
> Christian> without border line. I checked that using skencil and
> Christian> pstoedit to convert into skencil's own format.
> Christian> Btw. I'm using a smaller figure size than the default
> Christian> and the eps always contains a small polygon with 4
> Christian> nodes down at the left bottom of larger page which is
> Christian> about DIN A4/US Letter which makes the bounding box
> Christian> unnecessary big.
> 
> You might want to try again. This is pretty much guaranteed to work.
> The Figure.draw method in figure.py reads:
> 
> if self.frameon: self.figurePatch.draw(renderer)
> 
I just checked by inserting a print statement, that self.frameon is True 4 times 
during one run of simple_plot.py with figure(frameon=False)
Christian
From: Christian K. <ck...@ho...> - 2005年11月19日 10:10:01
Attachments: simple_framoff.png
John Hunter wrote:
>>>>>>"Christian" == Christian Kristukat <ck...@ho...> writes:
> 
> 
> Christian> I tried that before. It gives a filled white frame
> Christian> without border line. I checked that using skencil and
> Christian> pstoedit to convert into skencil's own format.
> Christian> Btw. I'm using a smaller figure size than the default
> Christian> and the eps always contains a small polygon with 4
> Christian> nodes down at the left bottom of larger page which is
> Christian> about DIN A4/US Letter which makes the bounding box
> Christian> unnecessary big.
> 
> You might want to try again. This is pretty much guaranteed to work.
> The Figure.draw method in figure.py reads:
> 
> if self.frameon: self.figurePatch.draw(renderer)
> 
> I don't see how the patch can be drawn if frameon is false...
Maybe we're not talking about the same frame? I attached a bitmap created with 
skencil after having converted the eps with pstoedit. I coloured the frame green.
Christian
From: Christian D. O. <chr...@gm...> - 2005年11月19日 00:34:56
Hi,
using the PS Backend and matplotlib 0.82 with python 2.3.5 I have the
problem that my graphs typically show up on top of the axes lines (the
figure frame) and tick marks. However, for a journal quality figure, I
need the axes and the tick marks to be on top of the graph(s).
I looked through the archives and found below e-mail. Has there been
any progress in fixing this? Has Michael Brady submitted a patch?
Thanks.
 - Christian
*****************************************************************
 >>>>> "Michael" =3D=3D Michael Brady <mbrady@jp...> writes:
 Michael> I tried setting the z-order of the tick objects, but it
 Michael> looks to me like the ticks are hard-coded to always draw
 Michael> before (underneath) any lines or patches.
 That"s right, they are. This is a bug and not a feature :-(
 The ticks are drawn as part of the Axis. See
 matplotlib.axes.Axes.draw, eg
 if self.axison:
 self.xaxis.draw(renderer)
 self.yaxis.draw(renderer)
 The Axis instances (XAxis and YAxis) are comprised of Line2D (the
 ticks) and Text (the labels) instances.
 Michael> Is there a way to tell the Axes to draw the ticks on top
 Michael> of any Polygons instead of underneath?
 As noted above, before any of the zorder sorting is done, the xaxis
 and yaxis are drawn. One possible solution is to move the axis
 drawing commands to the
 end of the Axes.draw function. Off the top of
 my head, I don"t see any problem with this approach. Typically, you
 want the ticks visible. We"ve talked in the past on the dev list
 about the desirability in supporting ticking inside, center or outside
 the axes box, but it hasn"t been implemented yet.
 Vis-a-vis zorder sorting, a more general solution would be to have a
 method which extracts the Artist primitives (Line2D and Text) from the
 XAxis and YAxis and adds them to the sort, but I"m not sure if this is
 actually better. In real life, I think you always want them on top.
 Right?
 Michael> If not, it doesn"t look like it would be too hard to
 Michael> modify Axes.draw() to respect the z-order of ticks. I"m
 Michael> happy to do this, although I"m nervous that it might
 Michael> break stuff that assumes that ticks are always drawn
 Michael> before everything else. John, do you recommend that I
 Michael> create such a mod?
 Yes, if you can find something that works, and behaves sanely over the
 poorman"s unit tests in examples/backend_driver.py.
 JDH

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