Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add savefig methods #11

Open
randyzwitch opened this issue Jan 23, 2018 · 6 comments
Open

Add savefig methods #11

randyzwitch opened this issue Jan 23, 2018 · 6 comments

Comments

@randyzwitch
Copy link
Owner

Add methods for writing JSON to file, writing whole HTML page, GIF/PNG, etc.

@davidanthoff
Copy link

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.

@randyzwitch
Copy link
Owner Author

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?

@davidanthoff
Copy link

No, it just gives us a shared saved method that lots and lots of packages can use, that is pretty much it.

@randyzwitch
Copy link
Owner Author

#53 might help with this

@davide-f
Copy link

davide-f commented Feb 26, 2021

Are there any update on this issue? I believe it would be very useful

@randyzwitch
Copy link
Owner Author

I'm not actively working on this package, but happy to review pull requests from the community

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants