| Contents > SharpPlot > Methods | Index |
SharpPlot.DrawVectors Method
Create a vector diagram (showing a directed graph, or current flows):
Example
sp.Heading = "Velocity Vectors"; sp.VectorStyle = VectorStyles.ArrowLines|VectorStyles.ValueTags; sp.DrawVectors(field);
The short tutorial shows a few of the possibilities and some sample code.
Overloads
- public void DrawVectors(int[][] data);
- public void DrawVectors(double[][] data);
- public void DrawVectors(int[,] data);
- public void DrawVectors(double[,] data);
- public void DrawVectors(int[] x1,int[] y1,int[] x2,int[] y2);
- public void DrawVectors(double[] x1,double[] y1,double[] x2,double[] y2);
Description
This method takes a matrix (or regular array) of xyxy pairs and draws a set of lines connecting each pair of points. The lines can be marked on the target end with arrows, or marked at the root/target ends with the current marker.
Two good uses of this chart type are for drawing any style of directed graph (typically a PERT chart or assembly diagram), or representing a vector field, such as current flows or wind speeds on a map. Value Tags are written along the lines, and are always centered. They may contain multiple lines of text.
See also ...
SharpPlot Members | DataStyle Property | VectorStyle Property

