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

SVGJS support for Gadfly docs? #229

Closed
tlnagy opened this issue Aug 22, 2016 · 6 comments
Closed

SVGJS support for Gadfly docs? #229

tlnagy opened this issue Aug 22, 2016 · 6 comments

Comments

@tlnagy
Copy link
Contributor

tlnagy commented Aug 22, 2016

I'm in the process of rewriting the documentation for Gadfly and we're transitioning to Documenter.jl. What would be the best way to show the plot in an @example block?

Currently:

using Gadfly # hide
plot(x = rand(10), y = rand(10)

gives

Plot...

which isn't very useful. I know I can do something like the following:

p = # hide
plot(x = rand(10), y = rand(10)
save(SVG("test.svg", 10cm, 6cm), p) # hide

and include ![](test.svg) which is way more cumbersome. I'm using the HTML renderer in the latest Documenter on 0.5 btw.

@MichaelHatherly
Copy link
Member

This will need an implementation of "inline" displays similar to what IJulia does, which just hasn't been that high on the list of priorities. It's perfectly doable, but I probably won't get around to implementing it for a little while yet.

@tlnagy
Copy link
Contributor Author

tlnagy commented Aug 23, 2016

It would be super nice for GiovineItalia/Gadfly.jl#879. I've mostly finished the transition, but it's missing all the plots that were automatically generated using https://github.com/dcjones/Judo.jl.

@MichaelHatherly
Copy link
Member

It would be super nice for GiovineItalia/Gadfly.jl#879.

Yes, definitely. Getting a complete solution to this will take a little while, but I think I could possibly hack in something to at least get basic svg output working for you for the moment.

MichaelHatherly added a commit that referenced this issue Aug 23, 2016
Allow `image/svg+xml` output for `at-example` blocks when the object
to be displayed is capable of output the format. Should help with #229,
but is not yet a completely general solution.
MichaelHatherly added a commit that referenced this issue Aug 23, 2016
Allow `image/svg+xml` output for `at-example` blocks when the object
to be displayed is capable of output the format. Should help with #229,
but is not yet a completely general solution.
MichaelHatherly added a commit to MichaelHatherly/Documenter.jl that referenced this issue Aug 24, 2016
Allow `image/svg+xml` output for `at-example` blocks when the object
to be displayed is capable of output the format. Should help with JuliaDocs#229,
but is not yet a completely general solution.

(cherry picked from commit 61e56be)
@tlnagy tlnagy changed the title Best way to show Gadfly plots? SVGJS support for Gadfly docs? Aug 26, 2016
@tlnagy
Copy link
Contributor Author

tlnagy commented Aug 26, 2016

@MichaelHatherly I'm super happy with the SVG support on master. Here's the docs for what is required for SVGJS support when you get the chance to look into it: http://tamasnagy.com/Gadfly.jl/man/backends.html#Changing-the-backend-1 Thanks!

@MichaelHatherly
Copy link
Member

Thanks, I'll have a look at that sometime over the next few weeks if I get a chance.

@mortenpi
Copy link
Member

I believe #764 fixed this. Please re-open / open a new issue if it still doesn't work.

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