All Projects → mitchelloharawild → ggquiver

mitchelloharawild / ggquiver

Licence: other
R package for quiver plots in 'ggplot2'

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to ggquiver

ggChernoff
R package for drawing Chernoff faces in ggplot2
Stars: ✭ 28 (-26.32%)
Mutual labels:  ggplot2, plot
Gglabeller
Shiny gadget for labeling points on ggplot
Stars: ✭ 161 (+323.68%)
Mutual labels:  ggplot2, plot
Ggthemes
Additional themes, scales, and geoms for ggplot2
Stars: ✭ 1,107 (+2813.16%)
Mutual labels:  ggplot2, plot
JPlotter
OpenGL based 2D Plotting Library for Java using AWT and LWJGL
Stars: ✭ 36 (-5.26%)
Mutual labels:  plot, quiver
Ggplotnim
A port of ggplot2 for Nim
Stars: ✭ 95 (+150%)
Mutual labels:  ggplot2, plot
gameofthrones
🎨 Game of Thrones inspired palette for R
Stars: ✭ 69 (+81.58%)
Mutual labels:  ggplot2, plot
TDAstats
R pipeline for computing persistent homology in topological data analysis. See https://doi.org/10.21105/joss.00860 for more details.
Stars: ✭ 26 (-31.58%)
Mutual labels:  ggplot2
rockthemes
R colour palettes based on classic rock album covers.
Stars: ✭ 30 (-21.05%)
Mutual labels:  ggplot2
ggdogs
The geom you always wished for adding dogs to ggplot2
Stars: ✭ 28 (-26.32%)
Mutual labels:  ggplot2
plotty
matplotlib-cpp with Eigen interfaces.
Stars: ✭ 39 (+2.63%)
Mutual labels:  plot
ofxHistoryPlot
Visualize value history on a configurable graph
Stars: ✭ 40 (+5.26%)
Mutual labels:  plot
ggtrack
restlessdata.com.au/ggtrack
Stars: ✭ 39 (+2.63%)
Mutual labels:  ggplot2
Clownfish
Smart Content Management System using Spring Boot
Stars: ✭ 14 (-63.16%)
Mutual labels:  velocity
PHPlot
A PHP graph library for dynamic scientific, business, and stock-market charts and graphs.
Stars: ✭ 29 (-23.68%)
Mutual labels:  plot
terminalplot
No description or website provided.
Stars: ✭ 40 (+5.26%)
Mutual labels:  plot
mltb
Machine Learning Tool Box
Stars: ✭ 25 (-34.21%)
Mutual labels:  plot
basemapR
Contains functions to add base maps to ggplot2 maps
Stars: ✭ 14 (-63.16%)
Mutual labels:  ggplot2
SerialTest
Serial port test tool on Win/Linux/Android, with realtime plotting, shortcut | 跨平台串口助手,带实时绘图和快捷发送面板
Stars: ✭ 98 (+157.89%)
Mutual labels:  plot
vscode-appsync-resolver-autocomplete
Adds autocomplete functionality to vscode when editing AWS AppSync resolver vtl files.
Stars: ✭ 21 (-44.74%)
Mutual labels:  velocity
plotly-plot
Polymer element for the plotly.js library
Stars: ✭ 21 (-44.74%)
Mutual labels:  plot

R-CMD-check CRAN_Status_Badge Downloads

ggquiver

Quiver plots for ggplot2. An extension of ‘ggplot2’ to provide quiver plots to visualise vector fields. This functionality is implemented using a geom to produce a new graphical layer, which allows aesthetic options. This layer can be overlaid on a map to improve visualisation of mapped data.

Installation

The stable version can be installed from CRAN:

install.packages("ggquiver")

The development version can be installed from GitHub using:

# install.packages("remotes")
remotes::install_github("mitchelloharawild/ggquiver")

Usage

ggquiver introduces a new geom geom_quiver(), which produces a quiver plot in ggplot2.

Quiver plots for functions can easily be produced using ggplot aeshetics. When a grid is detected, the size of the vectors are automatically adjusted to fit within the grid.

library(ggplot2)
library(ggquiver)
expand.grid(x=seq(0,pi,pi/12), y=seq(0,pi,pi/12)) %>%
  ggplot(aes(x=x,y=y,u=cos(x),v=sin(y))) +
  geom_quiver()

The ggplot2 example for seal movements is easily reproduced, with appropriately scaled arrowhead sizes. Here, the vecsize is set to zero to not resize the vectors.

ggplot(seals, aes(x=long, y=lat, u=delta_long, v=delta_lat)) + 
  geom_quiver(vecsize=0) + 
  borders("state")

Quiver plot arrows can be centered about x and y coordinates, which is useful when working with maps and scaled vectors.

library(ggmap)
library(dplyr)

wind_data <- wind %>% filter(between(lon, -96, -93) & between(lat, 28.7, 30))
qmplot(lon, lat, data=wind_data, extent="panel", geom = "blank", zoom=8, maptype = "toner-lite") + 
  geom_quiver(aes(u=delta_lon, v=delta_lat, colour = spd), center=TRUE)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].