Skip to content

Commit

Permalink
Merge pull request #25 from JuliaRobotics/test/4Q19/pdfexport
Browse files Browse the repository at this point in the history
Cairo 0.7, 0.8 pdf export and Test
  • Loading branch information
dehann committed Dec 30, 2019
2 parents 4698678 + 057adaf commit ec309ed
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
Cairo = "0.6, 0.7, 0.8, 1"
Cairo = "0.7, 0.8, 1"
Colors = "0.9.4, 0.10, 0.11, 0.12"
Compose = "0.7.4, 0.8"
DocStringExtensions = "0.7, 0.8, 0.9, 0.10, 1"
Expand Down
27 changes: 3 additions & 24 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,29 +1,8 @@
using Test
using KernelDensityEstimate
using KernelDensityEstimatePlotting
using Colors
# individual test scripts for different features

include("testBasicPlotting.jl")


@testset "Test basic plotting functions..." begin

# check for errors on plotting code
p = kde!(rand(100));
q = kde!(rand(100).+1.0);

plotKDE([p],c=["red"]);
plot(p);

plot([p;q], c=["red";"green"])

p2 = kde!(rand(3,100));
q2 = kde!(rand(3,100).+1.0);

plot(p2);
plot([p2;q2]);
plot([p2;q2];c=["red";"green"],levels=3);

end
include("testPDFExport.jl")



Expand Down
26 changes: 26 additions & 0 deletions test/testBasicPlotting.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# test basic plotting

using Test
using KernelDensityEstimate
using KernelDensityEstimatePlotting
using Colors

@testset "Test basic plotting functions..." begin

# check for errors on plotting code
p = kde!(rand(100));
q = kde!(rand(100).+1.0);

plotKDE([p],c=["red"]);
plot(p);

plot([p;q], c=["red";"green"])

p2 = kde!(rand(3,100));
q2 = kde!(rand(3,100).+1.0);

plot(p2);
plot([p2;q2]);
plot([p2;q2];c=["red";"green"],levels=3);

end
15 changes: 15 additions & 0 deletions test/testPDFExport.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# tests Cairo and Pango


using Test
using Gadfly
using Cairo


@testset "Test exporting plot figure to PDF" begin

pl = Gadfly.plot(y=randn(10), Geom.line)

pl |> PDF("/tmp/test.pdf")

end

0 comments on commit ec309ed

Please sign in to comment.