fonsp / Pluto.jl

🎈 Simple reactive notebooks for Julia
https://plutojl.org/
MIT License
5k stars 296 forks source link

tiny plots #1207

Closed dorn-gerhard closed 3 years ago

dorn-gerhard commented 3 years ago

Since two days I experienced the standard Plots to be rather small is this a Pluto issue or has this to do with gr or some graphical backend?

grafik

fonsp commented 3 years ago

Hi Gerhard!

Can you move using Plots to its own cell and see if that changes the result? Can you post the result of:

import Pkg

Text(sprint(io -> Pkg.status(;io=io)))

Update Pluto if it is not the latest version

dorn-gerhard commented 3 years ago

Hey Fons :)

Sure, here it is (same tiny plot): I hope my used packages do not interfer somehow, but I do not have so many in use.

I also experienced the tiny plots in the PlutoSliderServer applications, some (maybe previously computed) graphs are large while others a tiny: https://captain-bayes.github.io/bayes-imoox/notebooks/random_dice.html

grafik

lnacquaroli commented 3 years ago

I experienced the same problem and forcing Plots to use PyPlot changed the size to a larger plot.

Not sure if it's related to GR itself, but it's a coincidence that using Interact.jl the same thing happens.

MasonProtter commented 3 years ago

I experienced the same problem after an update. I did some investigating, and it seems that my version of GR.jl got downgraded to a quite old version. Explicitly doing Pkg.add("GR"); Pkg.update() and then restarting Pluto fixed it for me.

hofmannmartin commented 3 years ago

I am having the same problem

fonsp commented 3 years ago

@hofmannmartin @dorn-gerhard Did https://github.com/fonsp/Pluto.jl/issues/1207#issuecomment-851651357 fix your problem?

fonsp commented 3 years ago

@dorn-gerhard Before updating GR, could you copy paste the output from Pkg.status and post it here? The screenshot you sent only contains part of the output.

If anyone else has this problem, it would be very helpful if you would run https://github.com/fonsp/Pluto.jl/issues/1207#issuecomment-851516036 and copy-paste the result here.

fonsp commented 3 years ago

@jheinen Any ideas?

hofmannmartin commented 3 years ago

@hofmannmartin @dorn-gerhard Did #1207 (comment) fix your problem?

yes it did. Currently using it as a workaround.

SyxP commented 3 years ago

@hofmannmartin @dorn-gerhard Did #1207 (comment) fix your problem?

yes it did. Currently using it as a workaround.

Why is this considered a workaround? It was likely that some of your packages are not on the appropriate versions, and there's nothing on Pluto side that can really deal with it.

dorn-gerhard commented 3 years ago

@hofmannmartin @dorn-gerhard Did #1207 (comment) fix your problem?

Yes, adding GR as package solved the problem, so I updated GR to the latest version (GR v0.52 -> v0.57.5): grafik

Then I removed the GR package again (having again v0.52) and it still works: grafik

dorn-gerhard commented 3 years ago

@dorn-gerhard Before updating GR, could you copy paste the output from Pkg.status and post it here? The screenshot you sent only contains part of the output.

If anyone else has this problem, it would be very helpful if you would run #1207 (comment) and copy-paste the result here.

The screenshot contains the full output - there was nothing more. Unfortunately I have already updated GR (added + update to v0.57.5) and downgraded (remove GR, resulting in GR v0.52.0) Now I can't reproduce the small figures any more. Figures appear in normal size.

Thank you all for your fast feedback 🙂

hofmannmartin commented 3 years ago

Why is this considered a workaround? It was likely that some of your packages are not on the appropriate versions, and there's nothing on Pluto side that can really deal with it.

You are right nothing on Pluto's side that can be done. It is probably to to with the Plots package. Thank you for your help.

fonsp commented 3 years ago

Thanks everyone! I will leave the issue open for a couple of days to make it more visible

jheinen commented 3 years ago

I can reproduce this strange behaviour if I Pkg.add("Plots") in an empty Julia environment, but I still have no idea why it uses an old GR version (0.52.2). If I first install GR (and then Plots), everything works fine.

hofmannmartin commented 3 years ago

The issue is indeed with Plots. There is already a pull request in the pipeline, that will fix this issue https://github.com/JuliaPlots/Plots.jl/pull/3526.

lnacquaroli commented 3 years ago

This was fixed after updating to Plots v1.15.3.

adannenberg commented 3 years ago

sorry, i found on google and then commented on the closed issue # 896. my bad... the issue cropped up there and the workaround was to add ;dpi = 460 to plot commands. my comment on the other post is below:

the issue appears to be back. i'm using pluto on a linux box and have tiny graphs until i add the ;dpi = 460 argument to my plot commands. here's what i have (along with julia 1.6.1)

Status ~/.julia/environments/v1.6/Project.toml [c52e3926] Atom v0.12.32 [336ed68f] CSV v0.8.5 [a93c6f00] DataFrames v1.1.1 [31c24e10] Distributions v0.25.2 [e5e0dc1b] Juno v0.8.4 [442fdcdd] Measures v0.3.1 [429524aa] Optim v1.3.0 [a03496cd] PlotlyBase v0.5.3 [f0f68f2c] PlotlyJS v0.14.1 [91a5bcdd] Plots v1.15.2 [c3e4b0f8] Pluto v0.14.7 [7f904dfe] PlutoUI v0.7.9 [d330b81b] PyPlot v2.9.0 [ade2ca70] Dates [10745b16] Statistics

lnacquaroli commented 3 years ago

@adannenberg Update Plots.jl and try again. You are using the previous version.

adannenberg commented 3 years ago

i did so and the problem is fixed. thanks.

fonsp commented 3 years ago

Fixed by #1090