Created:
Jun 9, 2009 12:27 PMLast Modified: Mar 18, 2024 12:59 AM
Vector plots show arrows on a two-dimensional plot and allow one to see four dimensions of data: x position, y position, arrow angle, and arrow length. Equivalently, the four dimensions can be x start position, y start position, x end position, and y end position. The latter form is most convenient for JMP. Though JMP doesn't have a menu command to create vector plots, arrows can be added to almost any plot without much trouble.
While lots of four-variable data sets can be adapted for vector display, I'll demonstrate with one of the most natural applications: wind data. This data set records wind speed and direction for various weather stations in the Chicago area. I used formulas to convert the speed and direction into end positions for the arrows and then added the following graphics script to a bivariate scatterplot using Customize from the graph's right-click menu.
Add background map and graphics script
Video Player is loading.
Current Time 0:00
/
Duration 0:00
Loaded: 0%
0:00
Stream Type LIVE
Remaining Time -0:00
1x
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
This is a modal window. This modal can be closed by pressing the Escape key or activating the close button.
Bivariate(
Y(:Lat1 ),
X(:Lon1 ),
Show Points(0),
SendToReport(
Dispatch({},"1", ScaleBox,{Min(-90.9505699180481)}),
Dispatch({},"2", ScaleBox,{Min(38.9936726055607),Max(44.9620694317012), Minor Ticks(0)}),
Dispatch({},"Bivar Plot",
FrameBox,{Frame Size(501,429), Add Graphics Script(1,
Description("Script"),Pen Size(2);For Each Row(Arrow({lon1, lat1},{lon2, lat2}));), Grid Line Order(3), Reference Line Order(2)})))
Here's a screen capture showing a little bit of the data table, graph, and customize dialog:Windcapture
The next steps were to delete the rows with no wind and to turn off the points in the graph.
To provide context, I added the map of weather stations provided by the weather service. Placing a image in a graph is a bit tricky (and could be the subject of another post). There are two options: Draw the picture in another custom graphics script, or drag and drop an existing image into the graph. I chose the latter since I had an image file. First, I sized the graph to be the same size as the image, and then I dragged the image file into the center of the graph. After a few tries, the alignment was pretty good. (BTW, we're working on making this better in JMP 9.)Wind May31
The plot shows relative wind readings taken at 6 p.m. on May 31, 2009. With the help of the background image, we can see how wind patterns vary in relation to Lake Michigan.