Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Try using png rather than svg with Plots #142

Closed
jlperla opened this issue Sep 29, 2018 · 6 comments
Closed

Try using png rather than svg with Plots #142

jlperla opened this issue Sep 29, 2018 · 6 comments

Comments

@jlperla
Copy link
Member

jlperla commented Sep 29, 2018

There are two issues with svg:

  • It requires you to trust a notebook in order to correct display it. Jupyter caches that trust, but otherwise it is a pain
  • I think it may create very large figures.

So one solution is to try to use png with plots. To do that, anywhere there is a using Plots change it to

using Plots
gr(fmt=:png)

I think! Check with one of the notebooks that has a large aiyagari.ipynb to see if it helps with the size.

@jlperla
Copy link
Member Author

jlperla commented Oct 2, 2018

Ask around to see what will decrease the notebook size before making the change.

@arnavs
Copy link
Member

arnavs commented Oct 2, 2018

The gr(fmt=:png) fixes the trust issue. I monkeyed with the plots settings below but couldn't seem to bring the size down:

default(dpi=30) # Instead of ~100, I believe
default(size=(400,200)) # Instead of ~(600, 300), ^

@jlperla
Copy link
Member Author

jlperla commented Oct 2, 2018

OK. We might need to post something on slack with a minimal notebook

@arnavs
Copy link
Member

arnavs commented Oct 2, 2018

@jlperla Nevermind, I forgot to make jupyter before ./run-notebooks.sh aiyagari.ipynb. Using DPI 25 and dimensions (300, 200) brings the size down to only 16.9 MB, but the plots are absolutely tiny. So I suspect something else is going on here.

Will close this for now, and open a separate issue to investigate filesizes.

@arnavs arnavs closed this as completed Oct 2, 2018
@jlperla
Copy link
Member Author

jlperla commented Oct 2, 2018

We should try again in a few days after doing an ] up for the Plots and GR. It could be a weird bug haunting older versions in the manifest.

@arnavs
Copy link
Member

arnavs commented Oct 2, 2018

Sounds good.

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

No branches or pull requests

2 participants