adjust markersize (#2589)

* fix px to pt conversion for markers

* fix test

* bump version [skip ci]

@JuliaRegistrator register
This commit is contained in:
Simon Christ 2020-04-16 15:13:21 +02:00 committed by GitHub
parent 3b3a09302f
commit 9b4c66be9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -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"

View File

@ -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

View File

@ -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))