From 9b4c66be9a54071aa8a70a74fbff682784c05465 Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Thu, 16 Apr 2020 15:13:21 +0200 Subject: [PATCH] adjust markersize (#2589) * fix px to pt conversion for markers * fix test * bump version [skip ci] @JuliaRegistrator register --- Project.toml | 2 +- src/backends/pgfplotsx.jl | 4 ++-- test/test_pgfplotsx.jl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 077cc30b..1594c7a5 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Plots" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" author = ["Tom Breloff (@tbreloff)"] -version = "1.0.10" +version = "1.0.11" [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" diff --git a/src/backends/pgfplotsx.jl b/src/backends/pgfplotsx.jl index 7029ca4e..ea067e7d 100644 --- a/src/backends/pgfplotsx.jl +++ b/src/backends/pgfplotsx.jl @@ -768,7 +768,7 @@ function pgfx_marker(plotattributes, i = 1) a_stroke = alpha(cstr_stroke) mark_size = pgfx_thickness_scaling(plotattributes) * - 0.5 * + 0.75 * _cycle(plotattributes[:markersize], i) return PGFPlotsX.Options( "mark" => @@ -780,7 +780,7 @@ function pgfx_marker(plotattributes, i = 1) "fill" => cstr, "fill opacity" => a, "line width" => - pgfx_thickness_scaling(plotattributes) * + pgfx_thickness_scaling(plotattributes) * 0.75 * _cycle(plotattributes[:markerstrokewidth], i), "rotate" => if shape == :dtriangle 180 diff --git a/test/test_pgfplotsx.jl b/test/test_pgfplotsx.jl index 65fe9902..162e6d3b 100644 --- a/test/test_pgfplotsx.jl +++ b/test/test_pgfplotsx.jl @@ -84,7 +84,7 @@ end @test marker.options["mark"] == "*" @test marker.options["mark options"]["color"] == RGBA{Float64}(colorant"green", 0.8) - @test marker.options["mark options"]["line width"] == 1 + @test marker.options["mark options"]["line width"] == 0.75 # 1px is 0.75pt end # testset @testset "Plot in pieces" begin pic = plot(rand(100) / 3, reg = true, fill = (0, :green))