Skip to contents

Plot a 2D vector field estimated by fit_2d_vf(). Powered by ggplot2::ggplot().

Usage

# S3 method for vectorfield
plot(
  x,
  arrow = grid::arrow(length = grid::unit(0.1, "cm")),
  show_estimated_vector = TRUE,
  estimated_vector_enlarge = 1,
  estimated_vector_options = list(),
  show_point = TRUE,
  point_options = list(size = 0.5),
  show_original_vector = FALSE,
  original_vector_enlarge = 1,
  original_vector_options = list(),
  show_used_vector = FALSE,
  used_vector_options = list(color = "red"),
  show_v_norm = FALSE,
  v_norm_options = list(),
  ...
)

Arguments

x

A vectorfield object estimated by fit_2d_vf().

arrow

The description of the arrow heads of the vectors on the plot (representing the vector field). Generated by grid::arrow(). Also see the arrow parameter of ggplot2::geom_segment().

show_estimated_vector

Show the vectors from the estimated model? TRUE by default.

estimated_vector_enlarge

A number. How many times should the vectors (representing the estimated vector field) be enlarged on the plot? This can be useful when the estimated vector field is too strong or too weak.

estimated_vector_options

A list passing other customized parameters to ggplot2::geom_segment() to control the vectors representing the estimated vector field.

show_point

Show the original data points? TRUE by default.

point_options

A list passing other customized parameters to ggplot2::geom_point() to control the points representing the original data point.

show_original_vector

Show the original vectors (i.e., the vectors between data points)? FALSE by default.

original_vector_enlarge

A number. How many times should the original vectors be enlarged on the plot?

original_vector_options

A list passing other customized parameters to ggplot2::geom_segment() to control the vectors representing the original data.

show_used_vector

Only for vector fields estimated by the "VFC" method. Should the vectors from the original data that are considered inliers be specially marked? FALSE by default.

used_vector_options

Only for vector fields estimated by the "VFC" method. A list passing other customized parameters to ggplot2::geom_segment() to control the vectors representing the inliers. Red by default.

show_v_norm

Show the norm of the estimated vectors (the strength of the vector field)? FALSE by default.

v_norm_options

A list passing other customized parameters to ggplot2::geom_raster() to control the layer representing the norm of the estimated vectors.

...

Not in use.

Value

A ggplot2 plot.