Name nicht aufgelöst: Framebox und andere EigenschaftenHallo zusammen,
Ich habe versucht, eine Funktion zu erstellen, aber es wird immer wieder ein Fehler mit der Framebox, der Achsenbox und der Umrissbox angezeigt. Ich verstehe nicht, was mit der Funktion nicht stimmt. Bitte helfen und erklären
Name ungelöst: Framebox im Zugriff oder Auswertung von „Framebox“, Framebox( 1) /*###*/
bivplot = Function( {x_param, y_param, int1, int2 },
biv = Bivariate( X( Column( x_param ) ), Y( Column( y_param ) ),
Fit Line( {Confid Curves Indiv( 0 ), Line Color( "Black" )} ),
Fit Special( Intercept( int1 ), Slope( 1 ), {Line Color( "Purple" )} ),
Fit Special( Intercept( int2 ), Slope( 1 ), {Line Color( "Purple" )} ));
rbiv = biv << Report;
rbiv[Framebox( 1 )] << {Marker Size( 3 )};
rbiv[axisbox( 2 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[axisbox( 1 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[Framebox( 1 )] << Row Legend( Column( "Sex" ), Color( 1 ), Marker( 0 ), Color Theme( "JMP Default" ), Continuous Scale( 0 ) );
rbiv[Outline Box( 3 )] << Close All Below;
);
colnamex = {"name1", "age1"};
colname = {"name2", "age2"};
int1 = {1.5, 2};
int2 ={-1.5, -2};
lapbiv = Fit Group (
For( i = 1, i <= N Items( colname ), i++,
bivplot( colname[i], colnamex[i], int1[i], int2[i] )
);
<<{Arrange in Rows( 4 )}
SendToReport(Dispatch({},"Fit Group", OutlineBox,{Set Title( "Correlation Plot (All)")}))
);DatenzugriffBetreff: Name nicht aufgelöst: Framebox und andere EigenschaftenIch verstehe. Danke für die klare Erklärung
Betreff: Name nicht aufgelöst: Framebox und andere EigenschaftenWenn Sie ein By()-Element in Bivariat haben, wird für jede By-Variablenebene ein separater Anzeigebaum erstellt.Die Referenzierung eines Objekts unterhalb einer bestimmten Ebene in den By-Variablen muss angegeben werden.
rbiv = report( biv[2] );
Unten sehen Sie ein einfaches Beispiel, bei dem der gesamte Bericht für die zweite Ebene der Variable „Nach Geschlecht“ gelöscht wird
Names Default To Here( 1 );
dt =
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "/C:/Program Files/SAS/JMPPRO/15/Samples/Data/Big Class.jmp" );
biv = bivariate( x( :height ), y( :weight ), by( :sex ) );
Show( biv );
Report( biv[2] )[Outline Box( 1 )] << delete;
Betreff: Name nicht aufgelöst: Framebox und andere EigenschaftenEs funktioniert jetzt gut, danke.
Aber ich habe eine zusätzliche Frage: Warum wird beim Versuch, Group By (:Sex) hinzuzufügen, ein Fehler angezeigt
Name ungelöst: Framebox beim Zugriff oder Auswertung von „Framebox“, Framebox( 1 ) /*###*/Ausnahme beim Plattformstart beim Zugriff oder Auswertung von „Fit Group“
bivplot = Function( {x_param, y_param, int1, int2},
biv = Bivariate(
X( Column( x_param ) ),
Y( Column( y_param ) ),
Group By (:Sex),
Fit Line( {Confid Curves Indiv( 0 ), Line Color( "Black" )} ),
Fit Special( Intercept( int1 ), Slope( 1 ), {Line Color( "Purple" )} ),
Fit Special( Intercept( int2 ), Slope( 1 ), {Line Color( "Purple" )} )
);
rbiv = biv << Report;
rbiv[Framebox( 1 )] << {Marker Size( 3 )};
rbiv[axisbox( 2 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[axisbox( 1 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[Framebox( 1 )] << Row Legend(
Column( "Sex" ),
Color( 1 ),
Marker( 0 ),
Color Theme( "JMP Default" ),
Continuous Scale( 0 )
);
rbiv[Outline Box( 3 )] << Close All Below;
);
Betreff: Name nicht aufgelöst: Framebox und andere EigenschaftenUnten ist eine funktionierende Version Ihres Skripts
bivplot = Function( {x_param, y_param, int1, int2},
biv = Bivariate(
X( Column( x_param ) ),
Y( Column( y_param ) ),
Fit Line( {Confid Curves Indiv( 0 ), Line Color( "Black" )} ),
Fit Special( Intercept( int1 ), Slope( 1 ), {Line Color( "Purple" )} ),
Fit Special( Intercept( int2 ), Slope( 1 ), {Line Color( "Purple" )} )
);
rbiv = biv << Report;
rbiv[Framebox( 1 )] << {Marker Size( 3 )};
rbiv[axisbox( 2 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[axisbox( 1 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[Framebox( 1 )] << Row Legend(
Column( "Sex" ),
Color( 1 ),
Marker( 0 ),
Color Theme( "JMP Default" ),
Continuous Scale( 0 )
);
rbiv[Outline Box( 3 )] << Close All Below;
);
colnamex = {"height", "weight"};
colname = {"weight", "height"};
int1 = {1.5, 2};
int2 = {-1.5, -2};
lapbiv = Fit Group(
For( i = 1, i <= N Items( colname ), i++,
bivplot( colname[i], colnamex[i], int1[i], int2[i] )
)
);
lapbiv << Arrange in Rows( 4 );
Report( lapbiv )[Outline Box( 1 )] << Set Title( "Correlation Plot (All)" );Betreff: Name nicht aufgelöst: Framebox und andere EigenschaftenHallo Txnelson, danke. Darf ich wissen, wie ich die Diagramme in 4 Zeilen anordnen kann, wenn <<[In Zeilen anordnen(4)} und SendToReport syntaktisch nicht korrekt sind?
Betreff: Name nicht aufgelöst: Framebox und andere EigenschaftenEs gibt ein paar Probleme.
- Die bivariate Plattform erfordert 2 numerische Spalten.Sie geben eine Namensspalte an, von der ich annehme, dass sie eine Zeichenspalte ist.
- <<[In Zeilen anordnen(4)} und SendToReport sind syntaktisch nicht korrekt, um an die Anzeige übergeben zu werden, nachdem die Plattform abgeschlossen ist.
Der folgende Code funktioniert mit der Big Class-Datentabelle
bivplot = Function( {x_param, y_param, int1, int2 },
biv = Bivariate( X( Column( x_param ) ), Y( Column( y_param ) ),
Fit Line( {Confid Curves Indiv( 0 ), Line Color( "Black" )} ),
Fit Special( Intercept( int1 ), Slope( 1 ), {Line Color( "Purple" )} ),
Fit Special( Intercept( int2 ), Slope( 1 ), {Line Color( "Purple" )} ));
rbiv = biv << Report;
rbiv[Framebox( 1 )] << {Marker Size( 3 )};
rbiv[axisbox( 2 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[axisbox( 1 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[Framebox( 1 )] << Row Legend( Column( "Sex" ), Color( 1 ), Marker( 0 ), Color Theme( "JMP Default" ), Continuous Scale( 0 ) );
rbiv[Outline Box( 3 )] << Close All Below;
);
colnamex = {"height", "weight"};
colname = {"weight", "height"};
int1 = {1.5, 2};
int2 ={-1.5, -2};
lapbiv = Fit Group (
For( i = 1, i <= N Items( colname ), i++,
bivplot( colname[i], colnamex[i], int1[i], int2[i] )
);
//<<{Arrange in Rows( 4 )}
//SendToReport(Dispatch({},"Fit Group", OutlineBox,{Set Title( "Correlation Plot (All)")}))
);