Skip to content

Commit 0040be4

Browse files
authored
Don't omit all digits when printing ticks (#308)
This is not the best fix, but at least it's something... fixes #322
1 parent 80cb1dc commit 0040be4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/geoaxis.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,8 @@ function vis_spine!(points, text, points_px, d, mindist, labeloffset)
507507
# TODO use xticklabelpad
508508
p_offset = p_px .+ (p.dir .* (3 * labeloffset))
509509
push!(points_px, p_offset)
510-
push!(text, string(round(Int, p.input[d]), "°"))
510+
x = round(p.input[d]; sigdigits = 3)
511+
push!(text, string(isinteger(x) ? round(Int, x) : x, "°"))
511512
end
512513
end
513514

0 commit comments

Comments
 (0)