-
Notifications
You must be signed in to change notification settings - Fork 118
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
collapse layer selector in mode "view" & scale trans functions (pseudo_log with sigma) #847
Comments
Hi @xtimbeau thanks for letting me know. This is a view-only option which we still have to migrate. Not a lot of work though :-) Besides that, I am curious about your suggestion related to the scale. Can you give me an example? |
hi @mtennekes, you can have a look at the scales package (https://scales.r-lib.org/reference/log_trans.html). Such transformation is very useful for color scales when the range of colors is negative to positive but when a linear scale gives too much room to high absolute value. Using that transform (and the cut parameter associated) allows to improve contrast. |
Ok, I borrowed some code from Please check if it makes sense @xtimbeau : World$HPI2 = World$HPI - 30
tm_shape(World) +
tm_polygons("HPI2", fill.scale = tm_scale_continuous())
tm_shape(World) +
tm_polygons("HPI2", fill.scale = tm_scale_continuous(trans = "pseudo_log")) The functions from scales has two parameters, Could you provide a data example for this scale would be useful? |
@mtennekes great ! I'll test it and try to factor a nice example. |
@mtennekes sigma is quite useful as it sets the cut for when the log is smoothed to a linear function. Pseudo log looks like a log above a few signa (or below a few -sigma) but is linear between -sigma and sigma. Base is also relevant because of that non log linearity. |
Collapse has already been set to TRUE by default (forgot to mention earlier). I've implemented Also added |
Hi, thanks for the package and the new v4 option, love the scale stuff (but you should add trans for neg/pos range like pseudo log).
Is there a way to collapse the layer selector in interactive mode (tmap-mode("view"). It stays open and occupy a lot of space on a standard map.
The text was updated successfully, but these errors were encountered: