Closed icaromedeiros closed 6 years ago
:+1: very relevant for offline plotting.
I would like to hide the top plotly toolbar in my plotly offline plots (python). I see this is done with a 'config' option in other versions of the plotly library. How can I do this in plotly offline for python?
I am using this function in offline.py to make my plots:
def plot(figure_or_data,
show_link=True, link_text='Export to plot.ly',
validate=True, output_type='file',
include_plotlyjs=True,
filename='temp-plot.html',
auto_open=True):
Same issue here - the config options for the modebar available in plotly.js aren't implemented in plotly.py https://plot.ly/javascript/configuration-options/ but I have a workaround here that may help the developers to integrate these options: http://stackoverflow.com/questions/36554705/adding-config-modes-to-plotly-py-offline-modebar
@yankev will this be merged into master?
This seems to have broken offline mode, which is still expecting the old argument signature for _plot_html
. See https://github.com/plotly/plotly.py/blob/4420d794ed58f31cd2c3a1f13558a9e9da798335/plotly/offline/offline.py#L311-L313
In this PR, I think line 311 should have been changed to:
plot_html, plotdivid, width, height = _plot_html(
figure_or_data, {'showLink':show_link, 'linkText':link_text}, validate,
'100%', 525, global_requirejs=True)
Without this, even the most basic usage fails.
Hi, I'm trying to use plotly with django and found this help: https://stackoverflow.com/questions/35092571/how-to-create-charts-with-plotly-on-django But the signature of _plot_html seems to have changed in plotly 2.0.11
Do you know if this has already been solved in a different version?
thanks
all config options are now supported in plotly.offline.plot
and plotly.offline.iplot
. They are not yet available in FigureWidget
, see https://github.com/plotly/plotly.py/issues/1074.
Is there a way to hide links when using cufflinks? Cufflinks iplot does not config as a parameter.
Hi @bluprince13, I don't know offhand, that would be something to bring up with the cufflinks project (https://github.com/santosjorge/cufflinks)
There is no way to set the 4th parameter in plotly.js when using offline plots as it is hardcoded in
_plot_html
(https://github.com/plotly/plotly.py/blob/master/plotly/offline/offline.py#L100)