Plotting multiple short lines using only points and slopesHi everyone,
I was wondering if there is a way to use a dataset of X,Y and slope values to and plot these on a single graph? Ideally it should also do this by group.
e.g.:
Group. X. Y. Slope
A. 1. 1. 2
A. 2. 2. 3
B. 3. 3. 4
The graph will show each of these points, with a slope around it, and the line should be half the distance to the previous and next point in the dataset.
Thank you!!
Advanced Statistical ModelingData Blending and CleanupMass CustomizationRe: Plotting multiple short lines using only points and slopesA Graph Box() Display Object can handle this. A script will have to be written to draw the lines, but it wouldn't be a difficult piece of code.
Take a look at the Graph Box() documentation in the Scripting Guide.
Re: Plotting multiple short lines using only points and slopesI did something like that where I wanted the g-force vector plotted for every location along a race track.
To get the lines, I added a customize script to the graph like this:
Pen Size( 1 );
For Each Row(
Line(
{:NGPSLongitude, :NGPSLatitude},
{:NGPSLongitude + :gLong / 2000, :NGPSLatitude + :gLat / 2000}
)
);

I've attached the data file below. The first script (bubble plot 3) has the figure above.
Re: Plotting multiple short lines using only points and slopesExcept for me not understanding what you mean by the lines being " half the distance...", another way to do this would be to create 2 new formula columns to find one more X and Y point, then do some table stacking and splitting to create graphs for each group, basically just fitting a line to each of the (now) 2 data points. I've attached a workflow (for which you need JMP 17) to demonstrate this. If you need the script, let me know, and I'll send it along. Output below:
