From cf82e1287bdeb7a272a409dbf48a3b77d1c1ce77 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sat, 21 Sep 2024 23:44:29 +0000 Subject: [PATCH] build based on 14b6002 --- dev/.documenter-siteinfo.json | 2 +- dev/index.html | 2 +- dev/plotly_basics/index.html | 2 +- dev/saving/index.html | 2 +- dev/settings/index.html | 2 +- dev/source/index.html | 2 +- dev/templates/index.html | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index f212cba..6af3c96 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-20T10:54:29","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-21T23:44:26","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index aed922d..6e1f95c 100644 --- a/dev/index.html +++ b/dev/index.html @@ -11,4 +11,4 @@ p.layout.title.text = "My Title!" # Re-display to see updated plot -p +p diff --git a/dev/plotly_basics/index.html b/dev/plotly_basics/index.html index 41977f2..de57b38 100644 --- a/dev/plotly_basics/index.html +++ b/dev/plotly_basics/index.html @@ -13,4 +13,4 @@ # streamtube sunburst surface table # treemap violin volume waterfall

Alternatively, you can type e.g. plot(; type="scatter", kw...).

Trace Chaining

PlotlyLight lets you chain traces with the dot syntax:

y = randn(20)
 
-plot.bar(; y).scatter(; y)
+plot.bar(; y).scatter(; y) diff --git a/dev/saving/index.html b/dev/saving/index.html index b012a6c..dfe3a4e 100644 --- a/dev/saving/index.html +++ b/dev/saving/index.html @@ -7,4 +7,4 @@ (;data, layout, config) = p -PlotlyKaleido.savefig((; data, layout, config), "myplot.png") +PlotlyKaleido.savefig((; data, layout, config), "myplot.png") diff --git a/dev/settings/index.html b/dev/settings/index.html index 1405742..f1c2b14 100644 --- a/dev/settings/index.html +++ b/dev/settings/index.html @@ -5,4 +5,4 @@ PlotlyLight.settings.config::EasyConfig.Config # default `config` for all plots PlotlyLight.settings.reuse_preview::Bool # In the REPL, open plots in same page (true, the default) or different pages. PlotlyLight.settings.style::Dict{String,String} # CSS styles for the plot <div> -PlotlyLight.settings.inject_head::Cobweb.Node # Code to inject at the bottom the <head>

Check out e.g. PlotlyLight.Settings().src to examine default values.

+PlotlyLight.settings.inject_head::Cobweb.Node # Code to inject at the bottom the <head>

Check out e.g. PlotlyLight.Settings().src to examine default values.

diff --git a/dev/source/index.html b/dev/source/index.html index 72384de..c72e902 100644 --- a/dev/source/index.html +++ b/dev/source/index.html @@ -2,4 +2,4 @@ Plotly.js Source · PlotlyLight

Plotly.js Source

Change how the plotly.js script gets loaded in the produced html via preset.source.<option>!().

preset.source.none!()       # Don't include the script.
 preset.source.cdn!()        # Use the official plotly.js CDN.
 preset.source.local!()      # Use a local version of the plotly.js script.
-preset.source.standalone!() # Copy-paste the plotly.js script into the html output.
+preset.source.standalone!() # Copy-paste the plotly.js script into the html output. diff --git a/dev/templates/index.html b/dev/templates/index.html index 37b2359..0c46ce9 100644 --- a/dev/templates/index.html +++ b/dev/templates/index.html @@ -1,7 +1,7 @@ Templates · PlotlyLight

Templates

Templates are set by using the preset.template.<template>! family of functions:

using PlotlyLight
 
-keys(PlotlyLight.preset.template)
(:none!, :ggplot2!, :gridon!, :plotly!, :plotly_dark!, :plotly_white!, :presentation!, :seaborn!, :simple_white!, :xgridoff!, :ygridoff!)

We'll use the following plot to demonstrate each template:

plt = plot.bar(y = randn(10))

none!()

preset.template.none!()

ggplot2!()

preset.template.ggplot2!()

gridon!()

preset.template.gridon!()

plotly!()

preset.template.plotly!()

plotly_dark!()

preset.template.plotly_dark!()

plotly_white!()

preset.template.plotly_white!()

presentation!()

preset.template.presentation!()

seaborn!()

preset.template.seaborn!()

simple_white!()

preset.template.simple_white!()

xgridoff!()

preset.template.xgridoff!()

ygridoff!()

preset.template.ygridoff!()

Custom Template

To create your own template, simply provide any JSON3-writeable object to PlotlyLight.settings.layout.template. Here's an example:

my_template = Config()
+keys(PlotlyLight.preset.template)
(:none!, :ggplot2!, :gridon!, :plotly!, :plotly_dark!, :plotly_white!, :presentation!, :seaborn!, :simple_white!, :xgridoff!, :ygridoff!)

We'll use the following plot to demonstrate each template:

plt = plot.bar(y = randn(10))

none!()

preset.template.none!()

ggplot2!()

preset.template.ggplot2!()

gridon!()

preset.template.gridon!()

plotly!()

preset.template.plotly!()

plotly_dark!()

preset.template.plotly_dark!()

plotly_white!()

preset.template.plotly_white!()

presentation!()

preset.template.presentation!()

seaborn!()

preset.template.seaborn!()

simple_white!()

preset.template.simple_white!()

xgridoff!()

preset.template.xgridoff!()

ygridoff!()

preset.template.ygridoff!()

Custom Template

To create your own template, simply provide any JSON3-writeable object to PlotlyLight.settings.layout.template. Here's an example:

my_template = Config()
 my_template.layout.title.text = "This Title Will be in Every Plot!"
 
-PlotlyLight.settings.layout.template = my_template
+PlotlyLight.settings.layout.template = my_template