-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Log-scales should use original units #464
Comments
+1 |
I don't get what the issue is, an MWE would be good |
I had a look today and I realise I also don't understand the original question (sorry jkrumbiegel 😅). Taking the example from the FAQ docs, log-e x-scale: julia> using CairoMakie, AlgebraOfGraphics
julia> using AlgebraOfGraphics: density
julia> df = (x = exp.(randn(1000)),)
(x = [0.2902271880952832, 0.7266166553765828, 1.2224270032596198, 1.1556703385577687, 1.039192132661528, 0.5057566035686333, 1.9256338664589439, 0.6326547724870978, 1.4070911916039912, 0.4846729493884399 … 1.2340141235965212, 1.4771395600162527, 1.6945694302578178, 1.4368012315220762, 2.132316760616112, 0.6859097611065411, 0.2833281990510391, 2.430832649126153, 0.5593374132456983, 0.16772035493995438],)
julia> kde1 = data(df) * mapping(:x) * density()
Layer
transformation: AlgebraOfGraphics.DensityAnalysis{MakieCore.Automatic, MakieCore.Automatic, MakieCore.Automatic}(MakieCore.Automatic(), 200, MakieCore.Automatic(), MakieCore.Automatic())
data: AlgebraOfGraphics.Columns{@NamedTuple{x::Vector{Float64}}}
positional:
1: x
named:
julia> draw(kde1, axis=(width=225, height=225, xscale=log,)) linear x-scale: draw(kde1, axis=(width=225, height=225)) log-10 x-scale: draw(kde1, axis=(width=225, height=225, xscale=log10,)) @ParadaCarleton what exactly is your problem? As jkrumbiegel said, we'll need a MWE from you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AoG offers log scales, but they seem to behave awkwardly. Asking for log scales on a density currently results in replacing
However, I don't think this is a very commonly-used operation--usually, plotting the uncorrected density is probably a mistake.
Instead, usually what I want is to have
log(x)
with tick-marks labeled in the original units. Instead of seeing1, 2, 3...
I'd prefer$10, $100, $1000...
along the x-axis, to help me interpret the graph in units I understand.The text was updated successfully, but these errors were encountered: