Skip to content

Provide PlotlyBase together with a `save()` function independently of PlotlyJS

License

Notifications You must be signed in to change notification settings

hhaensel/PlotlySave.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Provide PlotlyBase together with a `save()` function independently of PlotlyJS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages