SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Nick S. <mat...@ni...> - 2008年03月31日 16:08:20
Hi,
I am new to this list, so forgive me if this has been asked before. I am
trying to do a radial plot and the following code does not seem to work:
# ------< START CODE >-------
import pylab
import matplotlib
fig = pylab.figure(figsize=(8,8))
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True)
pylab.hold(True)
ax.plot([4.189, 4.188],[41.347, 41.058], color = 'green', lw=1)
#ax.plot([4.199, 4.188],[41.347, 41.058], color = 'green', lw=1)
ax.set_rmax(80) # scale plot
pylab.show()
# ------< END CODE >-------
When you run this, the entire background of the plot turns green. If you
comment out the first "ax.plot" and uncomment the line below it, it works as
expected. Any ideas as to what is going on? Is there some kind of limitation
to the smallest line allowed? Thanks for any help!
---Nick
From: Michael D. <md...@st...> - 2008年04月01日 12:27:56
Nick Susch wrote:
> Hi,
>
> I am new to this list, so forgive me if this has been asked before. I 
> am trying to do a radial plot and the following code does not seem to 
> work:
>
> # ------< START CODE >-------
> import pylab
> import matplotlib
>
> fig = pylab.figure(figsize=(8,8))
> ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True)
>
> pylab.hold(True)
> ax.plot([4.189, 4.188],[41.347, 41.058], color = 'green', lw=1)
> #ax.plot([4.199, 4.188],[41.347, 41.058], color = 'green', lw=1)
> ax.set_rmax(80) # scale plot
> pylab.show()
> # ------< END CODE >-------
>
>
> When you run this, the entire background of the plot turns green. If 
> you comment out the first "ax.plot" and uncomment the line below it, 
> it works as expected. Any ideas as to what is going on? Is there some 
> kind of limitation to the smallest line allowed? Thanks for any help!
It may be that the line is too close to unity and Agg (the rendering 
engine) is messing up. That's the best explanation I can think of as 
well...
However, it does seem like other backends (Ps, Pdf, Cairo) do work. You 
may try using those as a workaround for now.
Note that the SVN trunk also works, possibly due to a) upgrading Agg 2.3 
to 2.4, and b) a pretty radical overhaul of the rendering engine, 
particularly polar plots.
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
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 によって変換されたページ (->オリジナル) /