Description Usage Arguments Details Examples
View source: R/draw_gradient.R
Draw gradient arrows on a plot made with mosaicCalc::contour_plot()
1 | draw_gradient(P = NULL, f, x, y, scale = 0.1, color = "red")
|
P |
The contour plot. Typically, you will pipe the |
f |
the mathematical function of two inputs whose gradient is to be displayed. |
x |
Numerical value(s) of the x-coordinate at which to evaluate the gradient. |
y |
Similar to |
scale |
A numerical fudge factor so that the gradient arrows can be scaled to look neither overlong nor overshort on the graph. |
color |
Default "red" |
Depending on the relative extent of the x and y axes, the gradient arrows
may not appear to the eye orthogonal to the contour lines, even though they are numerically.
Use coord_fixed()
as shown in the example to fix this graphical artifact.
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.