From fb13b94378d91bbf35c8ce48cce222a23128e42b Mon Sep 17 00:00:00 2001 From: Josh Day Date: Wed, 24 Apr 2024 09:16:26 -0400 Subject: [PATCH] remove margin when repldisplay-ing plot --- Project.toml | 2 +- src/PlotlyLight.jl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 5275b95..202d96b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "PlotlyLight" uuid = "ca7969ec-10b3-423e-8d99-40f33abb42bf" authors = ["joshday "] -version = "0.9.0" +version = "0.9.1" [deps] Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" diff --git a/src/PlotlyLight.jl b/src/PlotlyLight.jl index 8aecbc8..5d3462e 100644 --- a/src/PlotlyLight.jl +++ b/src/PlotlyLight.jl @@ -106,7 +106,8 @@ function html_iframe(o::Plot; height=settings.height, width=settings.width, styl end Base.show(io::IO, ::MIME"text/html", o::Plot) = show(io, MIME"text/html"(), html_iframe(o)) Base.show(io::IO, ::MIME"juliavscode/html", o::Plot) = show(io, MIME"text/html"(), o) -Base.display(::REPL.REPLDisplay, o::Plot) = Cobweb.preview(o, reuse=settings.reuse_preview) + +Base.display(::REPL.REPLDisplay, o::Plot) = Cobweb.preview(h.html(h.body(o, style="margin: 0px;")), reuse=settings.reuse_preview) #-----------------------------------------------------------------------------# preset # `preset_template_` overwrites `settings.layout.template`