TidierOrg / TidierPlots.jl

Tidier data visualization in Julia, modeled after the ggplot2 R package.
MIT License
196 stars 7 forks source link

Plot is visualized twice in Jupyter Notebooks and Quarto html pages #66

Closed AdaemmerP closed 3 months ago

AdaemmerP commented 3 months ago

When running the following code in a Jupyter Notebook or using Quarto (html output), the plot is shown twice. This does not occur when creating that plot in a simple .jl-file:

using DataFrames
using Tidier

df = DataFrame(a = 1:100, b=rand(100))
@chain df begin
    ggplot(aes(x=:a, y=:b)) 
    geom_point()
end
rdboyes commented 3 months ago

Hi - this can be fixed using the option plot_show - specifically, do the following early in your notebook:

TidierPlots_set("plot_show", false)

If you don't want the printout of the properties of the plot to show, you can also change the option "plot_log".

I should add a page to the documentation that explains optimal setups for various environments - thanks for reporting this!

AdaemmerP commented 3 months ago

Great, thanks!

rdboyes commented 3 months ago

added a paragraph in the readme and documentation to explain this: https://github.com/TidierOrg/TidierPlots.jl?tab=readme-ov-file#display-options-for-quarto-jupyter-and-plutojl