Skip to content

Conversation

@i-aki-y
Copy link

@i-aki-y i-aki-y commented Aug 1, 2022

I want to fix the error which is discussed in #920.

The plotting.show() function is a alias of the show_canvas() method and it expect for an ax object in matplotlib, while the GP.plot()(==add_to_canvas()) function returns plots dict.

See also:

def show_canvas(self, ax, **kwargs):
ax.figure.canvas.draw()
return ax.figure

To fix this, I just replace the return value of add_to_canvas() from plots to ax.

Note:
The return value of the add_to_canvas() function was changed at the commit 4f3047e from ax to plots.
Unfortunately, I could not find the reason why this fix was needed.

I would appreciate it if you reviewed this.

@codecov
Copy link

codecov bot commented Aug 1, 2022

Codecov Report

Merging #989 (2b3e705) into devel (f63ed48) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##            devel     #989      +/-   ##
==========================================
+ Coverage   54.49%   54.51%   +0.01%     
==========================================
  Files         210      210              
  Lines       21560    21560              
  Branches     3169     3169              
==========================================
+ Hits        11750    11753       +3     
+ Misses       9255     9252       -3     
  Partials      555      555              

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant