Skip to content

Commit

Permalink
Fix rich rticks for PolarAxis (#3615)
Browse files Browse the repository at this point in the history
* Widen type of rticklabel of PolarAxis from AbstractString to Any

* Emend test to include rich text in rticks of PolarAxis

* Update CHANGELOG.md

---------

Co-authored-by: Anshul Singhvi <asinghvi17@simons-rock.edu>
Co-authored-by: Frederic Freyer <frederic481994@hotmail.de>
Co-authored-by: Simon <sdanisch@protonmail.com>
  • Loading branch information
4 people authored Feb 21, 2024
1 parent 8af7331 commit 9068299
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
- Fixed bugs with format strings and add new features by switching to Format.jl [#3633](https://github.com/MakieOrg/Makie.jl/pull/3633).
- Fixed an issue where CairoMakie would unnecessarily rasterize polygons [#3605](https://github.com/MakieOrg/Makie.jl/pull/3605).
- Added `PointBased` conversion trait to `scatterlines` recipe [#3603](https://github.com/MakieOrg/Makie.jl/pull/3603).

- Fixed PolarAxis `rticks` being incompatible with rich text. [#3615](https://github.com/MakieOrg/Makie.jl/pull/3615)
-
## [0.20.7] - 2024-02-04

- Equalized alignment point of mirrored ticks to that of normal ticks [#3598](https://github.com/MakieOrg/Makie.jl/pull/3598).
Expand Down
1 change: 1 addition & 0 deletions ReferenceTests/src/tests/figures_and_makielayout.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ end
thetaticklabelsize = 18, thetaticklabelcolor = :blue,
thetaticklabelstrokewidth = 1, thetaticklabelstrokecolor = :white,
thetaticks = ([0, π/2, π, 3π/2], ["A", "B", "C", rich("D", color = :orange)]), # https://github.com/MakieOrg/Makie.jl/issues/3583
rticks = ([0.0, 2.5, 5.0, 7.5, 10.0], ["0.0", "2.5", "5.0", "7.5", rich("10.0", color = :orange)])
)
f
end
Expand Down
2 changes: 1 addition & 1 deletion src/makielayout/blocks/polaraxis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ function _polar_clip_polygon(
end

function draw_axis!(po::PolarAxis)
rtick_pos_lbl = Observable{Vector{<:Tuple{AbstractString, Point2f}}}()
rtick_pos_lbl = Observable{Vector{<:Tuple{Any, Point2f}}}()
rtick_align = Observable{Point2f}()
rtick_offset = Observable{Point2f}()
rtick_rotation = Observable{Float32}()
Expand Down

0 comments on commit 9068299

Please sign in to comment.