Skip to content

Commit

Permalink
remove styles from docs as they are not supported anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
sglyon committed Jul 30, 2021
1 parent 289fe1f commit f837a34
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 292 deletions.
27 changes: 13 additions & 14 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using Random, Dates, LinearAlgebra, DelimitedFiles

# to override display_dict below
import Documenter.Utilities: display_dict, limitstringmime
using Base64: stringmime
using Base64:stringmime

function display_dict(p::PlotlyBase.Plot)
out = Dict{MIME,Any}()
Expand Down Expand Up @@ -39,7 +39,7 @@ function single_example_file(filename::String)

# Read lines from a files
fulltext = open(
f->read(f, String),
f -> read(f, String),
joinpath(THIS_DIR, "..", "examples", filename),
"r"
)
Expand All @@ -55,19 +55,19 @@ function single_example_file(filename::String)
else
first_line = findfirst(x -> match(regex, x) !== nothing, all_lines)
if first_line !== nothing
preamble = strip(join(all_lines[1:first_line-1], "\n"))
preamble = strip(join(all_lines[1:first_line - 1], "\n"))
write_example(preamble)
end
end

while true
# Find next function name (break if none)
l = findnext(x -> match(regex, x) !== nothing, all_lines, l+1)
l = findnext(x -> match(regex, x) !== nothing, all_lines, l + 1)
if l == 0 || l === nothing
break
end
# find corresponding end for this function
end_l = findnext(x -> match(regex_end, x) !== nothing, all_lines, l+1)
end_l = findnext(x -> match(regex_end, x) !== nothing, all_lines, l + 1)

# Pull out function text
func_block = join(all_lines[l:end_l], "\n")
Expand Down Expand Up @@ -98,22 +98,21 @@ end
handle_examples()

makedocs(
sitename = "PlotlyJS",
format = Documenter.HTML(
assets = [
sitename="PlotlyJS",
format=Documenter.HTML(
assets=[
asset("https://cdn.plot.ly/plotly-1.54.7.js")
]
),
modules = [PlotlyJS, PlotlyBase],
modules=[PlotlyJS, PlotlyBase],
linkcheck=true,
pages = [
pages=[
"Home" => "index.md",
"User Guide" => [
"Preliminaries" => "basics.md",
"Building Blocks" => "building_traces_layouts.md",
"Putting it together" => "syncplots.md",
"Working with plots" => "manipulating_plots.md",
"Styles" => "styles.md",
"Contributing" => "contributing.md",
],
"Examples" => [
Expand Down Expand Up @@ -141,10 +140,10 @@ makedocs(
# Documenter can also automatically deploy documentation to gh-pages.
# See "Hosting Documentation" and deploydocs() in the Documenter manual
# for more information.
#=deploydocs(
#= deploydocs(
repo = "<repository url>"
)=#
) =#

deploydocs(
repo = "github.com/JuliaPlots/PlotlyJS.jl.git",
repo="github.com/JuliaPlots/PlotlyJS.jl.git",
)
3 changes: 0 additions & 3 deletions docs/src/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,11 @@ mutable struct Plot{TT<:AbstractVector{<:AbstractTrace},TL<:AbstractLayout,TF<:A
divid::UUID
config::PlotConfig
frames::TF
style::Style
end
```

The `data`, `layout`, `divid`, `config`, and `frames` fields of the `Plot` type map 1-1 to the arguments to the `Plotly.newplot` function.

The `style` argument is unique to Julia and hooks into the Julia based themeing and styling system as described in [the style docs](@ref styles)


[_plotlyjs]: https://plotly.com/javascript/
[_plotlyref]: https://plotly.com/julia/reference/
4 changes: 2 additions & 2 deletions docs/src/examples/violin.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ violin_side_by_side()
```

```@example violin
function violin_style()
function violin_styled()
y1 = vcat(abs.(20 .* rand(100)), rand(UInt16, 300) .* 500 ./ typemax(UInt16))
y2 = [25.261999999999997, 66.5419, 98.2114, 0.09070629 ]
box = attr(fillcolor="black", line_color="black", width=0.01)
Expand Down Expand Up @@ -157,6 +157,6 @@ function violin_style()
)
plot([trace1, trace2], layout)
end
violin_style()
violin_styled()
```

272 changes: 0 additions & 272 deletions docs/src/styles.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/src/syncplots.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ mutable struct Plot{TT<:AbstractVector{<:AbstractTrace},TL<:AbstractLayout,TF<:A
frames::TF
divid::UUID
config::PlotConfig
style::Style
end
```

Expand Down

0 comments on commit f837a34

Please sign in to comment.