Add savefig methods
randyzwitch opened this issue · 6 comments
Add methods for writing JSON to file, writing whole HTML page, GIF/PNG, etc.
There is also a story for this via FileIO.jl: if your figure object implements show
methods for SVG, PNG, PDF or EPS, it automatically hooks into the FileIO.jl save
method, without you having to do anything else. So things like save('myfig.png", fig)
will just work if fig
supports a show
method for the PNG mime type. The IOContext
in these cases will have a custom property :full_fidelity=>true
that indicates that the show
method should write a full fidelity version, not something meant for a display, in case that makes a difference.
It's not really clear to me what FileIO is providing here, to be honest.
I can see wanting to write an EChart
directly to json (I already defined print(x::EChart)
, would just need to write it to file), getting a PNG (which can be done from inside echarts.js), and possibly writing a whole HTML page out (which could be factored out of my show method).
Is there any key functionality that FileIO provides that I'm not understanding?
No, it just gives us a shared saved
method that lots and lots of packages can use, that is pretty much it.
#53 might help with this
Are there any update on this issue? I believe it would be very useful
I'm not actively working on this package, but happy to review pull requests from the community