SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(33)
Dec
(20)
2004 Jan
(7)
Feb
(44)
Mar
(51)
Apr
(43)
May
(43)
Jun
(36)
Jul
(61)
Aug
(44)
Sep
(25)
Oct
(82)
Nov
(97)
Dec
(47)
2005 Jan
(77)
Feb
(143)
Mar
(42)
Apr
(31)
May
(93)
Jun
(93)
Jul
(35)
Aug
(78)
Sep
(56)
Oct
(44)
Nov
(72)
Dec
(75)
2006 Jan
(116)
Feb
(99)
Mar
(181)
Apr
(171)
May
(112)
Jun
(86)
Jul
(91)
Aug
(111)
Sep
(77)
Oct
(72)
Nov
(57)
Dec
(51)
2007 Jan
(64)
Feb
(116)
Mar
(70)
Apr
(74)
May
(53)
Jun
(40)
Jul
(519)
Aug
(151)
Sep
(132)
Oct
(74)
Nov
(282)
Dec
(190)
2008 Jan
(141)
Feb
(67)
Mar
(69)
Apr
(96)
May
(227)
Jun
(404)
Jul
(399)
Aug
(96)
Sep
(120)
Oct
(205)
Nov
(126)
Dec
(261)
2009 Jan
(136)
Feb
(136)
Mar
(119)
Apr
(124)
May
(155)
Jun
(98)
Jul
(136)
Aug
(292)
Sep
(174)
Oct
(126)
Nov
(126)
Dec
(79)
2010 Jan
(109)
Feb
(83)
Mar
(139)
Apr
(91)
May
(79)
Jun
(164)
Jul
(184)
Aug
(146)
Sep
(163)
Oct
(128)
Nov
(70)
Dec
(73)
2011 Jan
(235)
Feb
(165)
Mar
(147)
Apr
(86)
May
(74)
Jun
(118)
Jul
(65)
Aug
(75)
Sep
(162)
Oct
(94)
Nov
(48)
Dec
(44)
2012 Jan
(49)
Feb
(40)
Mar
(88)
Apr
(35)
May
(52)
Jun
(69)
Jul
(90)
Aug
(123)
Sep
(112)
Oct
(120)
Nov
(105)
Dec
(116)
2013 Jan
(76)
Feb
(26)
Mar
(78)
Apr
(43)
May
(61)
Jun
(53)
Jul
(147)
Aug
(85)
Sep
(83)
Oct
(122)
Nov
(18)
Dec
(27)
2014 Jan
(58)
Feb
(25)
Mar
(49)
Apr
(17)
May
(29)
Jun
(39)
Jul
(53)
Aug
(52)
Sep
(35)
Oct
(47)
Nov
(110)
Dec
(27)
2015 Jan
(50)
Feb
(93)
Mar
(96)
Apr
(30)
May
(55)
Jun
(83)
Jul
(44)
Aug
(8)
Sep
(5)
Oct
Nov
(1)
Dec
(1)
2016 Jan
Feb
Mar
(1)
Apr
May
Jun
(2)
Jul
Aug
(3)
Sep
(1)
Oct
(3)
Nov
Dec
2017 Jan
Feb
(5)
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
(7)
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S






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





Showing 2 results of 2

From: John H. <jd...@gm...> - 2007年12月08日 14:10:05
On Dec 7, 2007 6:02 PM, James Evans <jre...@ea...> wrote:
> There appears to be an issue with the agg backend with how it is drawing
> ellipses (or maybe it is how matplotlib uses agg), but the attached script
> shows how a point, which should be coincident with the center circle, but it
> is not. The second plot shows the same data, but using a custom (and much
> slower) algorithm for drawing the ellipses, where the point is properly
> coincident.
Thanks for the test case James -- I will try and sort this out ASAP.
Michael, do you see the same on the transforms branch? The branch is
on a newer version of agg so if not, perhaps it is a simple matter of
upgrading agg on the trunk. I'm travelling currently bt will be back
omorrow and ill look at this ASAP.
JDH
From: James E. <jre...@ea...> - 2007年12月08日 00:03:12
=0A=
# This example can be boiled down to a more simplistic example=0A=
# to show the problem, but bu including the upper and lower=0A=
# bound ellipses, it demonstrates how significant this error=0A=
# is to our plots.=0A=
=0A=
import math=0A=
from pylab import *=0A=
from matplotlib.patches import Ellipse=0A=
=0A=
# given a point x, y=0A=
x =3D 2692.440=0A=
y =3D 6720.850=0A=
=0A=
# get is the radius of a circle through this point=0A=
r =3D math.sqrt( x*x+y*y )=0A=
=0A=
# show some comparative circles=0A=
delta =3D 6=0A=
=0A=
=0A=
##################################################=0A=
def custom_ellipse( ax, x, y, major, minor, theta, numpoints =3D 750, =
**kwargs ):=0A=
 xs =3D []=0A=
 ys =3D []=0A=
 incr =3D 2.0*math.pi / numpoints=0A=
 incrTheta =3D 0.0=0A=
 while incrTheta <=3D (2.0*math.pi):=0A=
 a =3D major * math.cos( incrTheta )=0A=
 b =3D minor * math.sin( incrTheta )=0A=
 l =3D math.sqrt( ( a**2 ) + ( b**2 ) )=0A=
 phi =3D math.atan2( b, a )=0A=
 incrTheta +=3D incr=0A=
=0A=
 xs.append( x + ( l * math.cos( theta + phi ) ) )=0A=
 ys.append( y + ( l * math.sin( theta + phi ) ) )=0A=
 # end while=0A=
=0A=
 incrTheta =3D 2.0*math.pi=0A=
 a =3D major * math.cos( incrTheta )=0A=
 b =3D minor * math.sin( incrTheta )=0A=
 l =3D sqrt( ( a**2 ) + ( b**2 ) )=0A=
 phi =3D math.atan2( b, a )=0A=
 xs.append( x + ( l * math.cos( theta + phi ) ) )=0A=
 ys.append( y + ( l * math.sin( theta + phi ) ) )=0A=
=0A=
 ellipseLine =3D ax.plot( xs, ys, **kwargs )=0A=
=0A=
=0A=
##################################################=0A=
# make the axes=0A=
ax =3D subplot( 211, aspect=3D'equal' )=0A=
ax.set_aspect( 'equal', 'datalim' )=0A=
=0A=
# make the lower-bound ellipse=0A=
diam =3D (r - delta) * 2.0=0A=
lower_ellipse =3D Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=3DFalse, =
edgecolor=3D"darkgreen" )=0A=
ax.add_patch( lower_ellipse )=0A=
=0A=
# make the target ellipse=0A=
diam =3D r * 2.0=0A=
target_ellipse =3D Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=3DFalse, =
edgecolor=3D"darkred" )=0A=
ax.add_patch( target_ellipse )=0A=
=0A=
# make the upper-bound ellipse=0A=
diam =3D (r + delta) * 2.0=0A=
upper_ellipse =3D Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=3DFalse, =
edgecolor=3D"darkblue" )=0A=
ax.add_patch( upper_ellipse )=0A=
=0A=
# make the target=0A=
diam =3D delta * 2.0=0A=
target =3D Ellipse( (x, y), diam, diam, 0.0, fill=3DFalse, =
edgecolor=3D"#DD1208" )=0A=
ax.add_patch( target )=0A=
=0A=
# give it a big marker=0A=
ax.plot( [x], [y], marker=3D'x', linestyle=3D'None', mfc=3D'red', =
mec=3D'red', markersize=3D10 )=0A=
=0A=
##################################################=0A=
# now lets do the same thing again using a custom ellipse function=0A=
=0A=
# make the axes=0A=
ax =3D subplot( 212, aspect=3D'equal', sharex=3Dax, sharey=3Dax )=0A=
ax.set_aspect( 'equal', 'datalim' )=0A=
=0A=
# make the lower-bound ellipse=0A=
custom_ellipse( ax, 0.0, 0.0, r-delta, r-delta, 0.0, color=3D"darkgreen" =
)=0A=
=0A=
# make the target ellipse=0A=
custom_ellipse( ax, 0.0, 0.0, r, r, 0.0, color=3D"darkred" )=0A=
=0A=
# make the upper-bound ellipse=0A=
custom_ellipse( ax, 0.0, 0.0, r+delta, r+delta, 0.0, color=3D"darkblue" )=0A=
=0A=
# make the target=0A=
custom_ellipse( ax, x, y, delta, delta, 0.0, color=3D"#BB1208" )=0A=
=0A=
# give it a big marker=0A=
ax.plot( [x], [y], marker=3D'x', linestyle=3D'None', mfc=3D'red', =
mec=3D'red', markersize=3D10 )=0A=
=0A=
##################################################=0A=
# lets zoom in to see the area of interest=0A=
=0A=
ax.set_xlim(2650, 2735)=0A=
ax.set_ylim(6705, 6735)=0A=
show()=0A=
=0A=

Showing 2 results of 2

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