Closed mooibroekd closed 1 month ago
Plotting the data proved to be easy:
openairmaps::trajMapStatic(clust$data$results,
colour = "cluster")
Next problem is how to increase the point size and line width without modifying the function itself. @jack-davison Do you know a way how to do this? I cannot use scale_linewidth_manual()
or scale_size_manual()
as these are not defined in the aes()
. For color it does work:
openairmaps::trajMapStatic(clust$data$results,
colour = "cluster") +
ggplot2::scale_color_manual(values = c("C1" = "red"))
Hi Denis - sorry for the delay - unfortunately the function isn't currently set up to expose those options to the user.
To do so, I'd need to expose the various arguments of geom_path()
, geom_point()
, etc. - linewidth
, size
, etc. - to the user. It might be good if the user could map these to a variable - e.g. make the size / linewidth proportionate to some variable.
I'll give this a look.
Hi again @mooibroekd,
Can you give the dev version a go? Added the linewidth
and size
args:
trajMapStatic(traj_data, colour = "pm10", size = "height") +
scale_color_gradientn(colors = openair::openColours(),
name = openair::quickText("PM10")) +
guides(size = guide_none(),
linewidth = guide_none()) +
theme_bw()
Or can set them to a fixed val - i.e., trajMapStatic(data, "pm10", size = 2L, linewidth = 1L)
I would like to plot the clustered results using ggplot2 on a static map.
Created on 2024-08-12 with reprex v2.1.1
Unfortunately the reprex does not work due to importTraj not working.