Vous pouvez créer vos propres graphiques avec JSL comme celui-ci. La sélection de points dans les graphiques ne sélectionnera pas de lignes dans les tableaux car des copies des données sont utilisées. Si vous avez besoin d'une légende, vous devrez également la créer, peut-être en utilisant text(...) comme indiqué. Il vous manquera d'autres fonctionnalités fournies par différentes plates-formes (splines, ajustements), ce qui peut rendre les autres idées combinant temporairement les tableaux bien meilleures.
ab = New Table( "ab data",
Add Rows( 4 ),
New Column( "a", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [11, 12, 15, 17, 19] ) ),
New Column( "b", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [30, 40, 20, 70, 50] ) )
);
cd = New Table( "cd data",
Add Rows( 4 ),
New Column( "c", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [21, 22, 25, 27] ) ),
New Column( "d", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [10, 20, 30, 60] ) )
);
New Window( "Example",
Graph Box(
Y Scale( 0, 80 ),
X Scale( 10, 30 ),
FrameSize(500,200),
Title( "ab and cd" ),
// comma delimited parameters above, semicolon delimited statements below
Pen Color( "red" );
Text Color( "red" );
Pen Size( 4 );
Marker Size( 6 );
Marker( ab:a[1 :: N Rows( ab )], ab:b[1 :: N Rows( ab )] );
Line( ab:a[1 :: N Rows( ab )], ab:b[1 :: N Rows( ab )] );
Text( {ab:a[N Rows( ab )], ab:b[N Rows( ab )]}, " ab" );
Pen Color( "green" );
Text Color( "green" );
Pen Size( 2 );
Marker Size( 3 );
Marker( cd:c[1 :: N Rows( cd )], cd:d[1 :: N Rows( cd )] );
Line( cd:c[1 :: N Rows( cd )], cd:d[1 :: N Rows( cd )] );
Text( {cd:c[N Rows( cd )], cd:d[N Rows( cd )]}, " cd" );
)
);
(Il y a beaucoup de répétitions dans cet exemple ; il est plus simple qu’il n’y paraît.)
Thick red curve and thin green curve from different tablesThick red curve and thin green curve from different tablesCourbe rouge épaisse et courbe verte fine de différents tableaux
Quelque chose comme ça pourrait fonctionner. L'exemple ci-dessous comporte 2 tableaux de données, un avec des données valides et un avec des valeurs aberrantes. Ensuite, pour utiliser les 2 ensemble, une nouvelle table de données "Privée" est créée et le graphique est exécuté à partir de celle-ci.
Names Default To Here( 1 );
// Create the data table with the good data
New Table( "Big Class",
Add Rows( 36 ),
New Column( "name",
Character,
"Nominal",
Set Values(
{"KATIE", "LOUISE", "JANE", "JACLYN", "LILLIE", "TIM", "JAMES", "BARBARA", "ALICE",
"SUSAN", "JOHN", "JOE", "MICHAEL", "DAVID", "LESLIE", "CAROL", "PATTY", "FREDERICK",
"HENRY", "LEWIS", "EDWARD", "CHRIS", "JEFFREY", "MARY", "AMY", "ROBERT", "WILLIAM",
"CLAY", "MARK", "DANNY", "MARTHA", "MARION", "PHILLIP", "LINDA", "KIRK", "LAWRENCE"}
)
),
New Column( "age",
Numeric,
"Ordinal",
Set Values(
[12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14,
14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 17, 17, 17]
)
),
New Column( "sex",
Character( 1 ),
"Nominal",
Set Values(
{"F", "F", "F", "F", "F", "M", "M", "F", "F", "F", "M", "M", "M", "M", "F", "F", "F",
"M", "M", "M", "M", "M", "M", "F", "F", "M", "M", "M", "M", "M", "F", "F", "M", "F",
"M", "M"}
)
),
New Column( "height",
Numeric,
"Continuous",
Format( "Fixed Dec", 5, 0 ),
Set Values(
[59, 61, 55, 66, 52, 60, 61, 60, 61, 56, 65, 63, 58, 59, 65, 63, 62, 63, 65, 64, 68,
64, 69, 62, 64, 67, 65, 66, 62, 66, 65, 60, 68, 62, 68, 70]
)
),
New Column( "weight",
Numeric,
"Continuous",
Format( "Fixed Dec", 5, 0 ),
Set Values(
[95, 123, 74, 145, 64, 84, 128, 112, 107, 67, 98, 105, 95, 79, 142, 84, 85, 93, 119,
92, 112, 99, 113, 92, 112, 128, 111, 105, 104, 106, 112, 115, 128, 116, 134, 172]
)
),
New Column( "source",
Character,
"Nominal",
Set Values(
{"Valid", "Valid", "Valid", "Valid", "Valid", "Valid", "Valid", "Valid", "Valid",
"Valid", "Valid", "Valid", "Valid", "Valid", "Valid", "Valid", "Valid", "Valid",
"Valid", "Valid", "Valid", "Valid", "Valid", "Valid", "Valid", "Valid", "Valid",
"Valid", "Valid", "Valid", "Valid", "Valid", "Valid", "Valid", "Valid", "Valid"}
)
)
);
// Create the outlier data table
New Table( "Outliers",
Add Rows( 4 ),
New Column( "name",
Character,
"Nominal",
Set Values( {"ROBERT", "JUDY", "ELIZABETH", "ALFRED"} )
),
New Column( "age",
Numeric,
"Ordinal",
Format( "Fixed Dec", 5, 0 ),
Set Values( [12, 14, 14, 14] )
),
New Column( "sex", Character( 1 ), "Nominal", Set Values( {"M", "F", "F", "M"} ) ),
New Column( "height",
Numeric,
"Continuous",
Format( "Fixed Dec", 5, 0 ),
Set Values( [51, 61, 62, 64] )
),
New Column( "weight",
Numeric,
"Continuous",
Format( "Fixed Dec", 5, 0 ),
Set Values( [79, 81, 91, 99] )
),
New Column( "source",
Character,
"Nominal",
Set Values( {"Outlier", "Outlier", "Outlier", "Outlier"} )
)
);
// Display chart by creating a nondisplayed data table
p1 = Data Table( "Big Class" ) << Concatenate( Data Table( "Outliers" ), private );
p1 << color by column( :source );
p1 << Bivariate( Y( :height ), X( :weight ), Fit Line( {Line Color( {213, 72, 87} )} ) );