AgitatedDove14
Sure!
Btw on "some layout properties should not be there". if you use px
API of Plotly
, create some figure and check fig.layout
you'll see it's quite populated. It'll be empty if the low-level go
API of Plotly
is used.
GloriousPenguin2 could you open a GitHub issue on it? Just making sure this will actually get fixed 🙂
AgitatedDove14 sorry if this was confusing, i try to clarify:
-
i don't use
matplotlib
period, hence don;t usereport_matplotlib_figure
. i usereport_plotly
-
the separator doesn't do the trick when there's just 1 plot in a row. and 1 plot in a row seems to be a "deeply" default behavior - i.e. would require ugly workarounds on our side like adding empty plots
-
i explicitly set the dimensions in the
plotly
via the code above, before passing it toreport_plotly
. theoretically since it'splotly
-native from the get-go, the dimensions should be respected since they're contained in thefig.layout
field. unless you strip it somewhere from https://github.com/allegroai/clearml/blob/1e680ae82f21b12997ed624d4c41d609fba57d4d/clearml/backend_interface/metrics/reporter.py#L349 or unless plotly/dash at the web ui frontend do something funny and disregard certain fields.
Hi ShortCoral15 !
Well, you can resize the plots either manually in the WebApp (hove over the separator) or programmatically using Matplotlib as a picture - see https://github.com/allegroai/clearml/blob/2ecf0b55f90f74a399270ae9f856b8950335f26b/examples/reporting/matplotlib_manual_reporting.py#L35
Hi GloriousPenguin2 , Sorry this is a bit confusing. Let me expand:
When converting into a plotly object (the default), you cannot really control the dimensions of the plot in the UI programatically, you can however drag the seperator and expand width / height If you pass to report_matplotlib_figure
the argument " report_image=True,
" it will create a static image from matplotlib figure (as rendered locally) and use that as the figure, this way you get exactly wysiwyg , but the downside it is not interactive.Make sense ?
Also something we are very much interested in (including the logger-based scatter plots etc)
GloriousPenguin2 hmm the UI might strip it?! I mean in most case it should not be there in the first place. Maybe we need to make sure that if provided the web UI will use the stored plotly definition, if this is the case we need to make sure that by default we do not store it, so in most cases the UI can use it to improve the layout. wdyt?
Hi SuccessfulKoala55
Author of the figures above here
The problem is, that it doesn't help. Left one - IPython render (what a dev sees in the notebook). Right one - what gets rendered in the web UI. Also it's built in Plotly
, not Matplotlib
the code that is used for axes:... fig.update_layout(height=900, width=600) fig.update_xaxes( scaleanchor="y", scaleratio=1, row=1, col=1, ) fig.update_xaxes(range=[0.0, 1.0]) fig.update_yaxes( range=[0.0, 1.0], row=1, col=1, ... )