Bonjour la communauté JMP,
J'essaie de produire un grand nombre de « tracés spaghetti » avec des lignes moyennes pour 3 catégories, comme indiqué ci-dessous, mais la seule façon pour moi de créer cet exemple est d'utiliser un script graphique personnalisé : existe-t-il un moyen de produire ce graphique. plus efficacement en combinant par exemple plus d'un critère de superposition ? De plus, quelle est la syntaxe appropriée pour attribuer une couleur spécifique aux marqueurs ajoutés dans le script graphique ?

//Graphics Script Associated with Plot Above
Pen Size( 4 );
Marker Size( 8 );
Pen Color( blue );
Line( {0, 0}, {2.0, 0.284}, {8.0, 0.564} );
Marker( {0, 0}, {2.0, 0.284}, {8.0, 0.564} );
Pen Color( green );
Line( {0, 0}, {2.0, 12.93}, {8.0, 12.24} );
Marker( {0, 0}, {2.0, 12.93}, {8.0, 12.24} );
Pen Color( purple );
Line( {0, 0}, {2.0, 6.17}, {8.0, 7.92} );
Marker( {0, 0}, {2.0, 6.17}, {8.0, 7.92} );
Merci pour votre aide.
Meilleur,
TS
@Thierry_S ,
Vous trouverez ci-dessous une version câblée de votre graphique (proche de votre version).La partie câblée pourrait être généralisée sans trop d'effort.J'espère que vous le trouverez utile, et sinon, au moins amusant

Names Default To Here( 1 );
dt = New Table( "Example",
New Column( "Group", character ),
New Column( "Run" ),
New Column( "Duration" ),
New Column( "value" )
);
For( g = 1, g <= 3, g++,
For( r = 1, r <= 15, r++,
dt << add rows( 1 );
dt:value[N Rows( dt )] = 0;
dt:Duration[N Rows( dt )] = 0;
dt:group[N Rows( dt )] = "Group " || Char( g );
dt:run[N Rows( dt )] = r;
)
);
For( g = 1, g <= 3, g++,
If(
g == 1, a = 0,
g == 2, a = 8,
a = 13
);
For( r = 1, r <= 15, r++,
d = 2;
dt << add rows( 1 );
dt:value[N Rows( dt )] = a + Random Uniform( a - 3, a + 3 );
dt:Duration[N Rows( dt )] = d;
dt:group[N Rows( dt )] = "Group " || Char( g );
dt:run[N Rows( dt )] = r;
dt << add rows( 1 );
d = 8;
dt:run[N Rows( dt )] = r;
dt:value[N Rows( dt )] = dt:value[N Rows( dt ) - 1] + Random Uniform( a - 3, a + 3 );
dt:Duration[N Rows( dt )] = d;
dt:group[N Rows( dt )] = "Group " || Char( g );
);
);
dt << new column( "Group Run", character, set each value(:Group || " " || char( :run )));
dt:group run << set property(
"value colors",
{"Group 1 1" = blue, "Group 1 2" = blue, "Group 1 3" = blue, "Group 1 4" = blue,
"Group 1 5" = blue, "Group 1 6" = blue, "Group 1 7" = blue, "Group 1 8" = blue,
"Group 1 9" = blue, "Group 1 10" = blue, "Group 1 11" = blue, "Group 1 12" = blue, "Group 1 13"
= blue, "Group 1 14" = blue, "Group 1 15" = blue, "Mean 1 1" = blue, "Group 2 1" = purple, "Group 2 2" = purple, "Group 2 3"
= purple, "Group 2 4" = purple, "Group 2 5" = purple, "Group 2 6" = purple, "Group 2 7" =
purple, "Group 2 8" = purple, "Group 2 9" = purple, "Group 2 10" = purple, "Group 2 11" =
purple, "Group 2 12" = purple, "Group 2 13" = purple, "Group 2 14" = purple, "Group 2 15" =
purple, "Mean 2 1" = purple, "Group 3 1" = green, "Group 3 2" = green, "Group 3 3" = green, "Group 3 4" = green,
"Group 3 5" = green, "Group 3 6" = green, "Group 3 7" = green, "Group 3 8" = green,
"Group 3 9" = green, "Group 3 10" = green, "Group 3 11" = green, "Group 3 12" = green,
"Group 3 13" = green, "Group 3 14" = green, "Group 3 15" = green, "Mean 3 1" = green }
);
dtSum = dt << Summary(
Group( :Group, :Duration ),
Mean( :value ),
Freq( "None" ),
Weight( "None" ),
statistics column name format( "column" ),
Link to original data table( 0 )
);
dtSum << delete columns(:N Rows);
dtSum << New Column("Group Run",
character, set each value("Mean " || char(word(2, :Group)) || " 1")
);
dtFinal = dt << Concatenate(dtSum
);
gb = Graph Builder(
Variables( X( :Duration ), Y( :value ), Overlay( :Group Run ) ),
Elements( Line( X, Y, Legend( 7 ) ) ),
show control panel( 0 ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
7,
Properties( 0, {Line Width( 1 )}, Item ID( "Group 1 1", 1 ) ),
Properties( 1, {Line Width( 1 )}, Item ID( "Group 1 2", 1 ) ),
Properties( 2, {Line Width( 1 )}, Item ID( "Group 1 3", 1 ) ),
Properties( 3, {Line Width( 1 )}, Item ID( "Group 1 4", 1 ) ),
Properties( 4, {Line Width( 1 )}, Item ID( "Group 1 5", 1 ) ),
Properties( 5, {Line Width( 1 )}, Item ID( "Group 1 6", 1 ) ),
Properties( 6, {Line Width( 1 )}, Item ID( "Group 1 7", 1 ) ),
Properties( 7, {Line Width( 1 )}, Item ID( "Group 1 8", 1 ) ),
Properties( 8, {Line Width( 1 )}, Item ID( "Group 1 9", 1 ) ),
Properties( 9, {Line Width( 1 )}, Item ID( "Group 1 10", 1 ) ),
Properties( 10, {Line Width( 1 )}, Item ID( "Group 1 11", 1 ) ),
Properties( 11, {Line Width( 1 )}, Item ID( "Group 1 12", 1 ) ),
Properties( 12, {Line Width( 1 )}, Item ID( "Group 1 13", 1 ) ),
Properties( 13, {Line Width( 1 )}, Item ID( "Group 1 14", 1 ) ),
Properties( 14, {Line Width( 1 )}, Item ID( "Group 1 15", 1 ) ),
Properties( 15, {Line Width( 1 )}, Item ID( "Group 2 1", 1 ) ),
Properties( 16, {Line Width( 1 )}, Item ID( "Group 2 2", 1 ) ),
Properties( 17, {Line Width( 1 )}, Item ID( "Group 2 3", 1 ) ),
Properties( 18, {Line Width( 1 )}, Item ID( "Group 2 4", 1 ) ),
Properties( 19, {Line Width( 1 )}, Item ID( "Group 2 5", 1 ) ),
Properties( 20, {Line Width( 1 )}, Item ID( "Group 2 6", 1 ) ),
Properties( 21, {Line Width( 1 )}, Item ID( "Group 2 7", 1 ) ),
Properties( 22, {Line Width( 1 )}, Item ID( "Group 2 8", 1 ) ),
Properties( 23, {Line Width( 1 )}, Item ID( "Group 2 9", 1 ) ),
Properties( 24, {Line Width( 1 )}, Item ID( "Group 2 10", 1 ) ),
Properties( 25, {Line Width( 1 )}, Item ID( "Group 2 11", 1 ) ),
Properties( 26, {Line Width( 1 )}, Item ID( "Group 2 12", 1 ) ),
Properties( 27, {Line Width( 1 )}, Item ID( "Group 2 13", 1 ) ),
Properties( 28, {Line Width( 1 )}, Item ID( "Group 2 14", 1 ) ),
Properties( 29, {Line Width( 1 )}, Item ID( "Group 2 15", 1 ) ),
Properties( 30, {Line Width( 1 )}, Item ID( "Group 3 1", 1 ) ),
Properties( 31, {Line Width( 1 )}, Item ID( "Group 3 2", 1 ) ),
Properties( 32, {Line Width( 1 )}, Item ID( "Group 3 3", 1 ) ),
Properties( 33, {Line Width( 1 )}, Item ID( "Group 3 4", 1 ) ),
Properties( 34, {Line Width( 1 )}, Item ID( "Group 3 5", 1 ) ),
Properties( 35, {Line Width( 1 )}, Item ID( "Group 3 6", 1 ) ),
Properties( 36, {Line Width( 1 )}, Item ID( "Group 3 7", 1 ) ),
Properties( 37, {Line Width( 1 )}, Item ID( "Group 3 8", 1 ) ),
Properties( 38, {Line Width( 1 )}, Item ID( "Group 3 9", 1 ) ),
Properties( 39, {Line Width( 1 )}, Item ID( "Group 3 10", 1 ) ),
Properties( 40, {Line Width( 1 )}, Item ID( "Group 3 11", 1 ) ),
Properties( 41, {Line Width( 1 )}, Item ID( "Group 3 12", 1 ) ),
Properties( 42, {Line Width( 1 )}, Item ID( "Group 3 13", 1 ) ),
Properties( 43, {Line Width( 1 )}, Item ID( "Group 3 14", 1 ) ),
Properties( 44, {Line Width( 1 )}, Item ID( "Group 3 15", 1 ) ),
Properties( 45, {Line Width( 4 )}, Item ID( "Mean 1 1", 1 ) ),
Properties( 46, {Line Width( 4 )}, Item ID( "Mean 2 1", 1 ) ),
Properties( 47, {Line Width( 4 )}, Item ID( "Mean 3 1", 1 ) )
)}
)));
report(gb)[LegendBox(1)]<<VISIBILITY></VISIBILITY>