mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
PY-71958 Plots(fix): Interactive mode in Python Plots show plot of fixed size, ignores figsize
GitOrigin-RevId: 48c072bcbfb6825dce0c0a8ecce5c046a88419d9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a1e73fe5a4
commit
7d6b08211f
@@ -101,17 +101,12 @@ class FigureCanvasInterAgg(FigureCanvasAgg):
|
||||
# mpld3 doesn't support 3D plots
|
||||
if IS_INTERACTIVE_PLOT and not html_string:
|
||||
w, h = self.figure.get_figwidth(), self.figure.get_figheight()
|
||||
self.figure.set_figwidth(DEFAULT_FIGURE_WIDTH)
|
||||
self.figure.set_figheight(DEFAULT_FIGURE_HEIGHT)
|
||||
|
||||
try:
|
||||
html_string = mpld3.fig_to_html(self.figure)
|
||||
except:
|
||||
pass
|
||||
|
||||
self.figure.set_figwidth(w)
|
||||
self.figure.set_figheight(h)
|
||||
|
||||
render = self.get_renderer()
|
||||
width = int(render.width)
|
||||
debug("Image width: %d" % width)
|
||||
|
||||
Reference in New Issue
Block a user