SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] chicken/egg (or figure/canvas) question

From: Benjamin R. <ben...@ou...> - 2014年11月22日 21:42:49
Actually, I think I found it. It looks like each backend defines a
new_figure_manager() function. Then, in backends/__init__.py, not only do
the aliased FigureManager and FigureCanvas objects get imported from the
appropriate module, but so does that function. It is pylab_setup() in the
backends/__init__.py that creates the canvas object, it seems?
I guess this is one of those remaining issues that is keeping us from fully
separating pyplot from the rest of matplotlib?
Cheers!
Ben Root
On Sat, Nov 22, 2014 at 4:30 PM, Benjamin Root <ben...@ou...> wrote:
> I thought I had this understood, but now I am confused while working on my
> last chapter. I know that the Figure object never directly creates its own
> canvas object. It starts off with a None object as a placeholder and waits
> for one to be given to it. However, I can only find one place where the
> figure object's set_canvas() method is called, and that is in the canvas's
> print_figure() method to restore itself as the figure's canvas after
> temporaraily switching to another backend for saving.
>
> I thought that the FigureManager initializes the primary canvas object,
> but that doesn't seem to be the case. Where is it done?
>
> Cheers!
> Ben Root
>

View entire thread

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