Fix deprecations from tests

pull/141/head
Matti Pastell 2018-08-14 11:32:51 +02:00
parent af7a6779a5
commit b41b4b4d41
5 changed files with 9 additions and 8 deletions

View File

@ -1,7 +1,7 @@
~~~~{.julia}
using Plots
gr()
x = linspace(0, 2*pi)
x = range(0, stop=2π, length=50)
println(x)
~~~~~~~~~~~~~

View File

@ -1,7 +1,7 @@
\begin{juliacode}
using Plots
gr()
x = linspace(0, 2*pi)
x = range(0, stop=2π, length=50)
println(x)
\end{juliacode}
\begin{juliaout}

View File

@ -3,7 +3,7 @@
```julia
using Plots
gr()
x = linspace(0, 2*pi)
x = range(0, stop=2π, length=50)
println(x)
p = plot(x, sin.(x), size =(900,300))
p
@ -21,5 +21,5 @@ scatter!(rand(100),markersize=6,c=:orange)
```{julia;echo=false; fig_cap="A random walk."; label="random"}
plot(cumsum(randn(1000, 1)))
plot(cumsum(randn(1000, 1), dims=1))
```

View File

@ -15,12 +15,13 @@ chunk.figures = ["figs/figures_plot1.png"]
@test Weave.formatfigures(chunk, Weave.github) == "![](figs/figures_plot1.png)\n"
@test Weave.formatfigures(chunk, Weave.hugo) == "{{< figure src=\"../figs/figures_plot1.png\" >}}"
@test Weave.formatfigures(chunk, Weave.multimarkdown) == "![][figs/figures_plot1.png]\n\n[figs/figures_plot1.png]: figs/figures_plot1.png \n"
@test Weave.formatfigures(chunk, Weave.adoc) == "image::figs/figures_plot1.png[width=nothing]\n"
@test Weave.formatfigures(chunk, Weave.rst) == ".. image:: figs/figures_plot1.png\n :width: nothing\n\n"
@test Weave.formatfigures(chunk, Weave.md2html) == "<img src=\"figs/figures_plot1.png\" />\n"
chunk.options[:fig_cap] = "Nice plot"
chunk.options[:out_width] = "100%"
@test Weave.formatfigures(chunk, Weave.adoc) == "image::figs/figures_plot1.png[width=100%]\n"
@test Weave.formatfigures(chunk, Weave.rst) == ".. image:: figs/figures_plot1.png\n :width: 100%\n\n"
chunk.options[:fig_cap] = "Nice plot"
@test Weave.formatfigures(chunk, Weave.tex) == "\\begin{figure}[!h]\n\\center\n\\includegraphics[width=100%]{figs/figures_plot1.png}\n\\caption{Nice plot}\n\\end{figure}\n"
@test Weave.formatfigures(chunk, Weave.pandoc) == "![Nice plot](figs/figures_plot1.png){width=100%}\n"
@test Weave.formatfigures(chunk, Weave.md2tex) == "\\begin{figure}[!h]\n\\center\n\\includegraphics[width=100%]{figs/figures_plot1.png}\n\\caption{Nice plot}\n\\end{figure}\n"

View File

@ -35,7 +35,7 @@ using Test
end
@testset "Plots" begin
info("Test: Weaving with Plots.jl")
@info("Test: Weaving with Plots.jl")
include("plotsjl_test.jl")
end