Je veux tracer le type de ligne différent avec la condition que SN == “R06CAD00B0 (GOLD)

Le deuxième graphique a-t-il fonctionné? Je n'ai pas accès à JMP 11, je ne peux donc pas le tester. Il y aura des différences significatives dans Graph Builder de JMP 11 à JMP 14.
txnelson, je trace un graphique avec votre premier script, mais la ligne pointillée est SN "12" - le script ne fonctionne pas. Au fait, ma version de JMP est la 11.
Voici deux exemples de scripts illustrant l'utilisation du paramètre Propriétés pour modifier le style de trait d'une valeur spécifique de SN. La première montre qu'il n'est pas nécessaire de spécifier la position pour que le code s'exécute correctement. La seconde montre que si vous voulez soutenir la position, vous pouvez déterminer quelle devrait être la position, puis l'insérer dans le code.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// Change the age column to be character and change it's name to SN,
// to mimic the SN in the graph from the first entry for the discussion
dt:age << data type( character ) << set name( "SN" );
// Change the value of the age=15 to age=15(Gold)
For Each Row( If( dt:SN == "14", dt:SN = "14(Gold)" ) );
// Create the code for the graph. Note,
theGraph = Expr(
Graph Builder(
Variables( X( :sex ), Y( :height ), Overlay( :SN ) ),
Elements( Line( X, Y, Legend( 9 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
9,
Properties( 0, {Line Style( "Dashed" )}, Item ID( "14(Gold)", 1 ) )
)}
)
)
);
);
// Run the graph with all of the data
theGraph;
// Create a new table with no age 12 individuals, so the position of 15(Gold)
// changes in the graph
dt << select where( :SN != "12" );
dtNo12 = dt << subset( selected rows( 1 ), selected columns( 0 ) );
// Run the graph with the no 12 data
theGraph;
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// Change the age column to be character and change it's name to SN,
// to mimic the SN in the graph from the first entry for the discussion
dt:age << data type( character ) << set name( "SN" );
// Change the value of the age=15 to age=15(Gold)
For Each Row( If( dt:SN == "14", dt:SN = "14(Gold)" ) );
// Create the code for the graph. Note,
theGraph = Expr(
// Find the position
Summarize( byGroup = by( :SN ) );
thePosition = Loc( byGroup, "14(Gold)" ) - 1;
Eval(
Substitute(
Expr(
Graph Builder(
Variables( X( :sex ), Y( :height ), Overlay( :SN ) ),
Elements( Line( X, Y, Legend( 9 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
9,
Properties( __pos__, {Line Style( "Dashed" )}, Item ID( "14(Gold)", 1 ) )
)}
)
)
)
),
Expr( __pos__ ), thePosition
)
);
);
// Run the graph with all of the data
theGraph;
// Create a new table with no age 12 individuals, so the position of 15(Gold)
// changes in the graph
dt << select where( :SN != "12" );
dtNo12 = dt << subset( selected rows( 1 ), selected columns( 0 ) );
// Run the graph with the no 12 data
theGraph;Je suis désolé, ma réponse n’a pas été très claire. Les instructions que je vous ai données vous fourniront la syntaxe spécifique requise pour apporter les modifications suggérées. Je suppose ensuite que vous utiliseriez ces informations pour créer un script conforme à vos spécifications et qui utiliserait la syntaxe pour apporter les modifications nécessaires à tous les graphiques.
Non ,Vous n'avez pas compris ce que je voulais dire ,Je veux créer un SN spécial avec une ligne en pointillé dans plusieurs graphiques. Le script de copie ne peut pas le faire.
Je connaissais cette méthode, mais j'ai beaucoup de graphiques pour changer le type de ligne. comment puis-je le faire par script.
Aller à la légende
Faites un clic droit sur la ligne que vous souhaitez modifier
Sélectionnez le style de ligne que vous voulez