We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5394156 commit a68a72aCopy full SHA for a68a72a
plotly/offline/offline.py
@@ -230,6 +230,16 @@ def plot(figure_or_data,
230
web browser after saving.
231
This argument only applies if `output_type` is 'file'.
232
"""
233
+ if output_type not in ['div', 'file']:
234
+ raise ValueError(
235
+ "`output_type` argument must be 'div' or 'file'. "
236
+ "You supplied `" + output_type + "``")
237
+ if not filename.endswith('.html') and output_type == 'file':
238
+ warnings.warn(
239
+ "Your filename `" + filename + "` didn't end with .html. "
240
+ "Adding .html to the end of your file.")
241
+ filename += '.html'
242
+
243
plot_html, plotdivid, width, height = _plot_html(
244
figure_or_data, show_link, link_text, validate,
245
'100%', '100%')
0 commit comments