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

automatically resize plots? #9

Closed
floswald opened this issue Aug 26, 2018 · 6 comments
Closed

automatically resize plots? #9

floswald opened this issue Aug 26, 2018 · 6 comments

Comments

@floswald
Copy link

I changed the Plots backend to gr and ended up with a huge plot on the slide:

# A plot

```@example index
using Plots; gr()
Plots.plot(rand(10))
savefig("statplot.png");
```

# ![](statplot.png)

is there a way to automatically resize the plot? it's weird that with pyplot it has exactly the right size.

@piever
Copy link
Owner

piever commented Aug 26, 2018

I think there used to be some issues with Plots and GR concerning png size (some dpi things I don't fully understand, see for example JuliaGraphics/QML.jl#53

I think saving to svg is in general a better option, does that work better for you?

@floswald
Copy link
Author

works perfectly with .svg! in that case you can forget about my PR #11
all of those things would probably be good to add to a wiki.

@piever
Copy link
Owner

piever commented Aug 26, 2018

The README could really use some love. Would you like to contribute some documentation / docstrings / examples? That'd be great! For example, if the presentation you're working on does not contain confidential material it could probably become a nice tutorial.

@floswald
Copy link
Author

sure, will do. i really like the setup. I'll have an entire course to move away from notebooks and into proper julia/literate scripts.

@piever
Copy link
Owner

piever commented Aug 26, 2018

Btw, will you be using julia 1.0 or 0.6? I'm a bit unsure whether I should merge #8 : if you plan on using 0.6 would breaking 0.6 on master make it harder for you to contribute?

@floswald
Copy link
Author

floswald commented Aug 26, 2018

good question! you know what, let's take the plunge and do this on 1.0. that course will restart only in january, so plenty of time for julia 1.0 packages to get rolling. I won't use Remark.js for an upcoming presentation in a hyper secure government agency in 2 weeks time (god knows what happens if you want to use javascript!)

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

No branches or pull requests

2 participants