PlotlySave.jl

Provide PlotlyBase together with a `save()` function independently of PlotlyJS
Author hhaensel
Popularity
3 Stars
Updated Last
2 Years Ago
Started In
January 2022

PlotlySave

Package to implement PlotlyBase together with a save() function independently of PlotlyJS.

Installation

using Pkg
Pkg.add("PlotlySave")

or

]add PlotlySave

Usage

PlotlySave reexports PlotlyBase so it is sufficient to do

using PlotlySave

p1 = Plot(scatter(x=1:10, y=2:11))
save("test.png", p1)

Background

Kaleido has for long been a part of PlotlyBase but has recently been removed, due to non-availability on some platforms and due to extra loadtime (more information, e.g. here). In order not to interfere with the current version of PlotlyJS this package exports save from FileIO with inverted order of filename and plot compared to savefig. If you want to use old scripts with existing savefig commands, you can import it via:

import PlotlySave.savefig

Future

There is a branch hh-abstractplot that plays together with respective branches in my forks of PlotlyBase and PlotlyJS to introduce an AbstractPlot type that both Plot and SyncPlot are subtypes of. That way many multiple definitions can be avoided and other projects could derive their own subtypes.

For this to happen PlotlySave would probably need to move to JuliaPlots.

Feel free to use the issue pages to comment or improve this approach.

Used By Packages

No packages found.