How do I adjust a plot so that axis tick labels are e.g. 10,000 instead of 1.0x10^4? My best guess is the ytickformat
property of Axis
, but the values you can set that paremeter to aren't documented afaict.
Of course, I can't actually tell for sure that there's not an example using it since the Franklin.jl search function is awful and turns up 0 results in a search for "tickformat" despite it clearly being listed as an attribute of Axis...
ytickformat
can be a function, which takes a single argument containing a vector of unformatted ticks, something like ytickformat = xs -> string.(xs)
might enough for what you want
This is documented here: https://makie.juliaplots.org/v0.15.1/examples/layoutables/axis/index.html#modifying_ticks
Thanks! Actually had just figured this out by reading the source code in lineaxis.jl.
The lack of usable search in the Makie.jl docs is super aggravating.
yeah, you'd think ytickformat
as a search term would return some, doesn't seem to return anything
Michael Hatherly said:
ytickformat
can be a function, which takes a single argument containing a vector of unformatted ticks, something likeytickformat = xs -> string.(xs)
might enough for what you want
In my case, ytickformat = xs -> string.(round.(Int, xs))
was what I wanted.
I feel like there should be a single-argument currying form of map or broadcast to make this kind of thing neater...
Adam non-jedi Beckmeyer has marked this topic as resolved.
Last updated: Nov 22 2024 at 04:41 UTC