Saving Plots
When saving your plots it's recommended to save if as a pdf if you want to use it in documents. This will create a static image, but retain the structure. However, sometimes you'll want to save it as a html file, as this can be loaded in your browser as a fully ineractable graph, the biggest strength of plotly! This is most useful in jupyter notebooks as the plot below the cell can be quite small.
# to save a file just provide the path and file name of the plot, change the ending to whatever you want the file to be e.g. .pdf, .html, .png
df.plot_overtime(
variable = 'moving',
facet_col = 'species',
facet_arg = ['D.vir', 'D.ere', 'D.wil', 'D.sec', 'D.yak'],
facet_labels = ['D.virilis', 'D.erecta', 'D.willistoni', 'D.sechellia', 'D.yakuba'],
save = './user/folder/plot.pdf'
)Last updated