I have groups of measurement that I want to plot "together".
The individual measurement curves of a group should have the same color and be semi-transparent.
For each group there should be an additional smoother curve with the same color.
Is this possible in Jmp? - without "workarounds"?
version 1:
version 2:
dt =Open( "$SAMPLE_DATA/Functional Data/Weekly Weather Data.jmp" );
dt << New Column( "group",Character,"Nominal",Formula( Substr( :STATION, 8, 1 ) ));
//version 1
dt << Graph Builder(
Variables(
X( :DATE ),
Y( :TAVG ),
Overlay( :STATION ),
Color( :group )
),
Elements(
Line( X, Y, Legend( 31 ) ),
Smoother( X, Y, Overlay( 0 ), Legend( 32 ) )
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
31,
Properties( 0, {Transparency( 0.2 )}, Item ID( "2", 1 ) ),
Properties( 1, {Transparency( 0.2 )}, Item ID( "3", 1 ) ),
Properties( 2, {Transparency( 0.2 )}, Item ID( "4", 1 ) )
)}
)
)
);
//version 2
dt << Graph Builder(
Variables( X( :DATE ), Y( :TAVG ), Overlay( :group ), Color( :group ) ),
Elements(
Line( X, Y, Legend( 31 ), Row order( 1 ) ),
Smoother( X, Y, Legend( 32 ) )
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
31,
Properties( 0, {Transparency( 0.2 )}, Item ID( "2", 1 ) ),
Properties( 1, {Transparency( 0.2 )}, Item ID( "3", 1 ) ),
Properties( 2, {Transparency( 0.2 )}, Item ID( "4", 1 ) )
)}
)
)
)
TillGraph Builder - Overlay by multiple columns or Graph Builder: Line - possibility to add breaks becomes available,
you can use this workaround:
add dummy rows with missing x / y value and select no connection for missing values.
version 3:
dt =Open( "$SAMPLE_DATA/Functional Data/Weekly Weather Data.jmp" );
dt << New Column( "group",Character,"Nominal",Formula( Substr( :STATION, 8, 1 ) ));
//version 3
stations = dt << Summary(Group( :STATION, :NAME ));
For EACH({station}, stations[0,0], dt << add row({:STATION=station[1],:NAME=station[2]}));
dt << sort( BY(:NAME, :DATE ), Replace Table);
dt << Graph Builder(
Variables( X( :DATE ), Y( :TAVG ), Overlay( :group ) ),
Elements(
Line( X, Y, Legend( 1 ), Row order( 1 ), Missing Values( "No Connection" ) ),
Smoother( X, Y, Legend( 2 ) )
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
1,
Properties( 0, {Transparency( 0.3 )}, Item ID( "2", 1 ) ),
Properties( 1, {Transparency( 0.3 )}, Item ID( "3", 1 ) ),
Properties( 2, {Transparency( 0.3 )}, Item ID( "4", 1 ) )
), Legend Model(
2,
Base( 0, 0, 0, Item ID( "2", 1 ) ),
Base( 1, 0, 0, Item ID( "3", 1 ) ),
Base( 2, 0, 0, Item ID( "4", 1 ) )
)}
)
)
)
#1000
Try removing group from color for smoother and to remove zigzag disable Row order
Ah, the Color = "Group" is just too much. It can be removed completely.
concerning Zig-Zag:
I want to have separate curves per station, this is why I enabled row order.
Disabling the option leads to one combined curve for all stations of a group.
version 2 (b):
I hope somebody finds a way to get this graph created in Jmp (17) - without adding new rows and columns to the graph.
Overlay by multiple column will solve the problem. If Overlay accepts more than one column, the user can select different Overlays for the two plot types:
Besides enhancing the Overlay functionality , here is another wishGraph Builder: Line - possibility to add breaks which uses a simple trick to add the breaks:
The idea: a measurement trace runs from left to right.
Each step from right to left marks the start of a new trace -> add a break.
TillGraph Builder - Overlay by multiple columns or Graph Builder: Line - possibility to add breaks becomes available,
you can use this workaround:
add dummy rows with missing x / y value and select no connection for missing values.
version 3:
dt =Open( "$SAMPLE_DATA/Functional Data/Weekly Weather Data.jmp" );
dt << New Column( "group",Character,"Nominal",Formula( Substr( :STATION, 8, 1 ) ));
//version 3
stations = dt << Summary(Group( :STATION, :NAME ));
For EACH({station}, stations[0,0], dt << add row({:STATION=station[1],:NAME=station[2]}));
dt << sort( BY(:NAME, :DATE ), Replace Table);
dt << Graph Builder(
Variables( X( :DATE ), Y( :TAVG ), Overlay( :group ) ),
Elements(
Line( X, Y, Legend( 1 ), Row order( 1 ), Missing Values( "No Connection" ) ),
Smoother( X, Y, Legend( 2 ) )
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
1,
Properties( 0, {Transparency( 0.3 )}, Item ID( "2", 1 ) ),
Properties( 1, {Transparency( 0.3 )}, Item ID( "3", 1 ) ),
Properties( 2, {Transparency( 0.3 )}, Item ID( "4", 1 ) )
), Legend Model(
2,
Base( 0, 0, 0, Item ID( "2", 1 ) ),
Base( 1, 0, 0, Item ID( "3", 1 ) ),
Base( 2, 0, 0, Item ID( "4", 1 ) )
)}
)
)
)
#1000
@XanGregg , will Overlay Encoding facilitate the creation of such plots (different color and individual fit curves for different variants - but more than one measurement curve per variant).
And Configure Levels?
no: again the zig-zag lines.
dt =Open( "$SAMPLE_DATA/Functional Data/Weekly Weather Data.jmp" );
Graph Builder(
Transform Column(
"STATION'",
Character,
Set Property( "Configure Levels", 1 ),
Formula(
Map Value(
:STATION,
{"USW00092811", "USW00012924", "USW00014922", "USW00014751",
"USW00024024", "USW00014751", "USW00024144", "USW00014751",
"USW00094626", "USW00014751", "USW00003868", "USW00003195",
"USW00003949", "USW00003195", "USW00013733", "USW00003195",
"USW00013877", "USW00003195", "USW00053182", "USW00003195",
"USW00093067", "USW00003195", "USW00093242", "USW00003195",
"USW00093718", "USW00003195"},
Unmatched( :STATION )
)
)
),
Variables( X( :DATE ), Y( :TAVG ), Overlay( :STATION' ) ),
Elements(
Line( X, Y, Legend( 1 ), Row order( 1 ), Missing Values( "No Connection" ) ),
Smoother( X, Y, Legend( 2 ) )
)
)If you generate such plots regularly, please have a look at QuickSelect Toolbar .There is a Shortcut Icon to create the dummy rows automatically and to sort the table to put the dummy rows in the right position.
The feature was removed from QuickSelect Toolbar.
A similar feature in now available via the GraphBuilder Toolbar
We are just beta testing a "remote control" AddIn for Graph Builder which will facilitate the manual formatting of the plots.
I added a button to remove the zig-zag lines : )
compared to "add dummy rows" it has the benefit that it doesn't collided with Sort data table + add rows + concatenate -- make it possible
a formalism like "curve ID column" in Fit curve to split the data into individual curves - but still to bundle similar curves based on another column.
Fit Curve has this feature - Graph Builder could benefit from the feature as well.