MCPcopy Index your code
hub / github.com/plotly/plotly.py / build_save_image_post_script

Function build_save_image_post_script

plotly/offline/offline.py:227–248  ·  view source on GitHub ↗
(
    image, image_filename, image_height, image_width, caller
)

Source from the content-addressed store, hash-verified

225
226
227def build_save_image_post_script(
228 image, image_filename, image_height, image_width, caller
229):
230 if image:
231 if image not in __IMAGE_FORMATS:
232 raise ValueError(
233 "The image parameter must be one of the following: {}".format(
234 __IMAGE_FORMATS
235 )
236 )
237
238 script = get_image_download_script(caller)
239 post_script = script.format(
240 format=image,
241 width=image_width,
242 height=image_height,
243 filename=image_filename,
244 )
245 else:
246 post_script = None
247
248 return post_script
249
250
251def init_notebook_mode(connected=False):

Callers 2

iplotFunction · 0.85
plotFunction · 0.85

Calls 2

formatMethod · 0.45

Tested by

no test coverage detected