SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: David A. <dwa...@su...> - 2010年02月26日 03:45:55
All,
I tried this code from: http://matplotlib.sourceforge.net/examples/widgets/cursor.py
from matplotlib.widgets import Cursor
import pylab
fig = pylab.figure(figsize=(8,6))
ax = fig.add_axes([0.075, 0.25, 0.9, 0.725], axisbg='#FFFFCC')
#ax = fig.add_subplot(111, axisbg='#FFFFCC')
canvas = ax.figure.canvas
x,y = 4*(pylab.rand(2,100)-.5)
ax.plot(x,y,'o')
ax.set_xlim(-2,2)
ax.set_ylim(-2,2)
# set useblit = True on gtkagg for enhanced performance
cursor = Cursor(ax, useblit=True, color='red', linewidth=2 )
pylab.show()
I got this error on my Macbook Pro:
The debugged program raised the exception unhandled AttributeError
"'FigureCanvasMac' object has no attribute 'copy_from_bbox'"
Any suggestions?
David
From: Jae-Joon L. <lee...@gm...> - 2010年02月28日 01:14:07
Did you try to turn off "useblit" option?
As mentioned in the comment, that option is only supported in the agg backend.
Regards,
-JJ
On Thu, Feb 25, 2010 at 10:45 PM, David Arnold
<dwa...@su...> wrote:
> All,
>
> I tried this code from: http://matplotlib.sourceforge.net/examples/widgets/cursor.py
>
> from matplotlib.widgets import Cursor
> import pylab
>
>
> fig = pylab.figure(figsize=(8,6))
> ax = fig.add_axes([0.075, 0.25, 0.9, 0.725], axisbg='#FFFFCC')
> #ax = fig.add_subplot(111, axisbg='#FFFFCC')
> canvas = ax.figure.canvas
>
> x,y = 4*(pylab.rand(2,100)-.5)
> ax.plot(x,y,'o')
> ax.set_xlim(-2,2)
> ax.set_ylim(-2,2)
>
> # set useblit = True on gtkagg for enhanced performance
> cursor = Cursor(ax, useblit=True, color='red', linewidth=2 )
>
> pylab.show()
>
> I got this error on my Macbook Pro:
>
> The debugged program raised the exception unhandled AttributeError
> "'FigureCanvasMac' object has no attribute 'copy_from_bbox'"
>
> Any suggestions?
>
> David
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
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 によって変換されたページ (->オリジナル) /