Create docs on pushing to master (#3494)
* Create docs.yml * Update docs.yml * Update docs.yml * Create docs.yml * Update docs.yml * [skip ci] * [skip ci] * [skip ci] * [skip ci] * Update docs.yml * Update docs.yml * Update docs.yml * Update docs.yml * fix pgfplotsx * fix pyplot * remove push workflow (should work without) * conditionally fix pyplot * change env-vars * fix * fix ref * clean up and cache artifacts * add Documenter_key to environment * fix parentheses * "one last fix" * dev => add * fix marker example * exclude 50 for plotly * install ms fonts * only trigger on master * remove REF pretending
This commit is contained in:
parent
27764bbc67
commit
15bd9c537d
50
.github/workflows/docs.yml
vendored
Normal file
50
.github/workflows/docs.yml
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
name: docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags: '*'
|
||||
|
||||
jobs:
|
||||
Build_docs:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
repository: JuliaPlots/PlotDocs.jl
|
||||
- uses: julia-actions/setup-julia@v1
|
||||
- name: Cache artifacts
|
||||
uses: actions/cache@v1
|
||||
env:
|
||||
cache-name: cache-artifacts
|
||||
with:
|
||||
path: ~/.julia/artifacts
|
||||
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-test-${{ env.cache-name }}-
|
||||
${{ runner.os }}-test-
|
||||
${{ runner.os }}-
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y qt5-default \
|
||||
ttf-mscorefonts-installer \
|
||||
poppler-utils \
|
||||
pdf2svg \
|
||||
texlive-latex-base \
|
||||
texlive-binaries \
|
||||
texlive-pictures \
|
||||
texlive-latex-extra \
|
||||
texlive-luatex \
|
||||
ghostscript-x \
|
||||
libgconf2-4
|
||||
sudo fc-cache -vr
|
||||
|
||||
- name: build documentation
|
||||
env:
|
||||
PYTHON: ""
|
||||
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
|
||||
run: |
|
||||
xvfb-run julia --color=yes --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.add(PackageSpec(name="Plots", rev=split(ENV["GITHUB_REF"], "/", limit=3)[3])); Pkg.instantiate()'
|
||||
xvfb-run julia --color=yes --project=docs/ -e 'withenv("GITHUB_REPOSITORY" => "JuliaPlots/PlotDocs.jl") do; include("docs/make.jl"); end'
|
||||
@ -82,6 +82,7 @@ function surface_to_vecs(x::AVec, y::AVec, s::Union{AMat,Surface})
|
||||
end
|
||||
return xn, yn, zn
|
||||
end
|
||||
surface_to_vecs(x::AVec, y::AVec, z::AVec) = x, y, z
|
||||
|
||||
function Base.push!(pgfx_plot::PGFPlotsXPlot, item)
|
||||
push!(pgfx_plot.the_plot, item)
|
||||
@ -483,8 +484,8 @@ function pgfx_add_series!(::Val{:surface}, axis, series_opt, series, series_func
|
||||
push!(
|
||||
series_opt,
|
||||
"surf" => nothing,
|
||||
"mesh/rows" => length(opt[:x]),
|
||||
"mesh/cols" => length(opt[:y]),
|
||||
"mesh/rows" => length(unique(opt[:x])), # unique if its all vectors
|
||||
"mesh/cols" => length(unique(opt[:y])),
|
||||
"z buffer" => "sort",
|
||||
"opacity" => alpha === nothing ? 1.0 : alpha,
|
||||
)
|
||||
|
||||
@ -1063,9 +1063,15 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
||||
ax.spines["left"]."set_position"("zero")
|
||||
end
|
||||
elseif sp[:framestyle] in (:grid, :none, :zerolines)
|
||||
if PyPlot.version >= v"3.4.1" # that is one where it worked, the API change may have some other value
|
||||
for spine in ax.spines
|
||||
ax.spines[string(spine)]."set_visible"(false)
|
||||
end
|
||||
else
|
||||
for (loc, spine) in ax.spines
|
||||
spine."set_visible"(false)
|
||||
end
|
||||
end
|
||||
if sp[:framestyle] == :zerolines
|
||||
ax."axhline"(y = 0, color = py_color(sp[:xaxis][:foreground_color_axis]), lw = py_thickness_scale(plt, 0.75))
|
||||
ax."axvline"(x = 0, color = py_color(sp[:yaxis][:foreground_color_axis]), lw = py_thickness_scale(plt, 0.75))
|
||||
|
||||
@ -7,7 +7,7 @@ mutable struct PlotExample
|
||||
exprs::Vector{Expr}
|
||||
end
|
||||
|
||||
# the _examples we'll run for each
|
||||
# the _examples we'll run for each backend
|
||||
const _examples = PlotExample[
|
||||
PlotExample( # 1
|
||||
"Lines",
|
||||
@ -241,14 +241,15 @@ const _examples = PlotExample[
|
||||
m -> m in Plots.supported_markers(),
|
||||
Plots._shape_keys,
|
||||
)
|
||||
markers = reshape(markers, 1, length(markers))
|
||||
markers = permutedims(markers)
|
||||
n = length(markers)
|
||||
x = range(0, stop = 10, length = n + 2)[2:(end - 1)]
|
||||
y = repeat(reshape(reverse(x), 1, :), n, 1)
|
||||
scatter(
|
||||
x,
|
||||
y,
|
||||
m = (8, :auto),
|
||||
m = markers,
|
||||
markersize = 8,
|
||||
lab = map(string, markers),
|
||||
bg = :linen,
|
||||
xlim = (0, 10),
|
||||
@ -1170,7 +1171,7 @@ _backend_skips = Dict(
|
||||
:gr => [25, 30, 47],
|
||||
:pyplot => [2, 25, 30, 31, 47, 49],
|
||||
:plotlyjs => [2, 21, 24, 25, 30, 31, 49, 51],
|
||||
:plotly => [2, 21, 24, 25, 30, 31, 49, 51],
|
||||
:plotly => [2, 21, 24, 25, 30, 31, 49, 50, 51],
|
||||
:pgfplotsx => [
|
||||
2, # animation
|
||||
6, # images
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user