Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# Reset the wind scalar to be half the size
wind_scale <- 0.5
# The exact same code as above
ggplot(data = ERA_pixel, aes(x = date, y = y_axis)) +
geom_segment(aes(x = date, xend = date + u, y = 0, yend = v),
arrow = arrow(length = unit(0.15, 'cm')), size = 0.5, alpha = 0.7) +
geom_point(aes(x = date, y = 0), alpha = 0.5, size = 1) +
scale_x_date(labels = date_format('%Y-%m-%d'), breaks = date_breaks('4 days')) +
scale_y_continuous(breaks = y_axis/wind_scale, labels = as.character(abs(y_axis)/wind_scale)) +
labs(x = NULL, y = 'Wind Speed (m/s)') +
coord_equal(ylim = c(min(y_axis/wind_scale), max(y_axis/wind_scale))) +
theme(axis.text.x = element_text(angle = 20, hjust = 0.4, vjust = 0.5, size = 8),
axis.text.y = element_text(size = 8))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment