Skip to content
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

Categorical raster not displaying properly #124

Open
JessKLockhart opened this issue Dec 14, 2023 · 0 comments
Open

Categorical raster not displaying properly #124

JessKLockhart opened this issue Dec 14, 2023 · 0 comments

Comments

@JessKLockhart
Copy link

I’m trying to animate movements over a categorical raster of land cover but for some reason the map isn’t displaying properly. The x-axis appears to be condensed and changing the extent doesn’t seem to help.

Here is my code and an example of the issue. Please let me know is there is a way to fix this. Any suggestions are greatly appreciated.

frames <- frames_spatial(test, r_list=habitat,r_times = starttime,r_type = "discrete",path_colours = c("red", "green", "yellow", "black"), path_legend = T, trace_show = T, trace_colour = "gray38", equidistant = FALSE, ext=ext2)%>%
add_gg(gg = expr(geom_path(data, aes(x = long, y = lat, group = group), color = 'blue', size = 1)), data = watercourse)%>% # add watercourses (Harper and Lambert creeks)
add_gg(expr(list(guides(colour = guide_legend(title = "Device ID")),(scale_colour_manual(values = c("red", "green", "yellow", "black"), labels = c("86131", "86132","86133","86134"))))))%>%
add_labels(title ="Wabasca Bison Early Winter Movements (2020-2023)",x = "Longitude", y = "Latitude") %>% # add some customization, such as axis labels, legend
add_northarrow(colour = "black") %>%
add_scalebar(colour = "black") %>%
add_timestamps(test, type = "label") %>%
add_progress(colour = "grey", size = 0.5, verbose = TRUE)%>%
add_gg(gg=expr(scale_fill_manual(values = c("#309143","#8ace73","#39737c","#2c69b0","#6ba3d6","skyblue","#b5dffd","#B6992D","#d5bb21","yellow","grey"), name= "Habitat Classes", labels=c("Evergreen Forest", "Woodland", "Emergent Marsh", "Graminoid Poor Fen", "Graminoid Rich Fen", "Meadow Marsh", "Fen", "Herbaceous", "Open Shrubs", "Tall Shrubs", "Other"))))

frames[[50]]

IMG_6683

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant