Hi all, I’m attempting to add plots into my package documentation using Plots.jl and Documenter.jl. However, creating a simple plot such as the following produces an error as below.
Code in markdown file:
using Plots
plot(1:100)
Resulting error when I tried julia --project=docs/ docs/make.jl
:
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
connect: No error
GKS: can't connect to GKS socket application
ERROR: LoadError: ReadOnlyMemoryError()
Stacktrace:
[1] setcharheight(height::Float64)
@ GR ~\.julia\packages\GR\bVi3d\src\GR.jl:1630
[2] gr_set_font(f::Plots.Font, s::Plots.Subplot{Plots.GRBackend}; halign::Symbol, valign::Symbol, color::ColorTypes.RGB{FixedPointNumbers.N0f8}, rotation::Float64)
@ Plots ~\.julia\packages\Plots\Awg62\src\backends\gr.jl:391
[3] gr_set_font(f::Plots.Font, s::Plots.Subplot{Plots.GRBackend})
@ Plots ~\.julia\packages\Plots\Awg62\src\backends\gr.jl:390
[4] _update_min_padding!(sp::Plots.Subplot{Plots.GRBackend})
@ Plots ~\.julia\packages\Plots\Awg62\src\backends\gr.jl:758
[5] iterate
@ .\generator.jl:47 [inlined]
[6] _collect(c::Matrix{RecipesBase.AbstractLayout}, itr::Base.Generator{Matrix{RecipesBase.AbstractLayout}, typeof(Plots._update_min_padding!)}, #unused#::Base.EltypeUnknown, isz::Base.HasShape{2})
@ Base .\array.jl:691
[7] collect_similar
@ .\array.jl:606 [inlined]
[8] map
@ .\abstractarray.jl:2294 [inlined]
[9] _update_min_padding!(layout::Plots.GridLayout)
@ Plots ~\.julia\packages\Plots\Awg62\src\layouts.jl:282
[10] prepare_output(plt::Plots.Plot{Plots.GRBackend})
@ Plots ~\.julia\packages\Plots\Awg62\src\plot.jl:224
[11] show
@ ~\.julia\packages\Plots\Awg62\src\output.jl:214 [inlined]
[12] __binrepr
@ .\multimedia.jl:159 [inlined]
[13] _textrepr
@ .\multimedia.jl:151 [inlined]
[14] stringmime(m::MIME{Symbol("text/html")}, x::Plots.Plot{Plots.GRBackend}; context::Nothing)
@ Base64 C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Base64\src\Base64.jl:43
[15] stringmime(m::MIME{Symbol("text/html")}, x::Plots.Plot{Plots.GRBackend})
@ Base64 C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Base64\src\Base64.jl:43
[16] display_dict(x::Plots.Plot{Plots.GRBackend})
@ Documenter.Utilities ~\.julia\packages\Documenter\f5jts\src\Utilities\Utilities.jl:627
[17] #invokelatest#2
@ .\essentials.jl:708 [inlined]
[18] invokelatest
@ .\essentials.jl:706 [inlined]
[19] runner(#unused#::Type{Documenter.Expanders.ExampleBlocks}, x::Markdown.Code, page::Documenter.Documents.Page, doc::Documenter.Documents.Document)
@ Documenter.Expanders ~\.julia\packages\Documenter\f5jts\src\Expanders.jl:582
[20] dispatch(::Type{Documenter.Expanders.ExpanderPipeline}, ::Markdown.Code, ::Vararg{Any, N} where N)
@ Documenter.Utilities.Selectors ~\.julia\packages\Documenter\f5jts\src\Utilities\Selectors.jl:170
[21] expand(doc::Documenter.Documents.Document)
@ Documenter.Expanders ~\.julia\packages\Documenter\f5jts\src\Expanders.jl:42
[22] runner(#unused#::Type{Documenter.Builder.ExpandTemplates}, doc::Documenter.Documents.Document)
@ Documenter.Builder ~\.julia\packages\Documenter\f5jts\src\Builder.jl:227
[23] dispatch(#unused#::Type{Documenter.Builder.DocumentPipeline}, x::Documenter.Documents.Document)
@ Documenter.Utilities.Selectors ~\.julia\packages\Documenter\f5jts\src\Utilities\Selectors.jl:170
[24] #2
@ ~\.julia\packages\Documenter\f5jts\src\Documenter.jl:249 [inlined]
[25] cd(f::Documenter.var"#2#3"{Documenter.Documents.Document}, dir::String)
@ Base.Filesystem .\file.jl:95
[26] #makedocs#1
@ ~\.julia\packages\Documenter\f5jts\src\Documenter.jl:248 [inlined]
[27] top-level scope
@ ~\Documents\WaveletsExt\docs\make.jl:3
in expression starting at C:\Users\LZFun\Documents\WaveletsExt\docs\make.jl:3
Could anyone shed some light on what’s happening here? This was never a problem when I worked on documentation a couple of months ago. Was there a new update that perhaps messed things up, or that it requires some form of changes in my code?
Thanks in advance.