取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
选择语言 隐藏翻译栏
qt
qt
Level I

add fitting line using jmp script.

I am using jmp script to draw X-Y scatter plots.

Can I add fitting lines by group using JMP scripts too?

here is sample of the script I copied:

Bivariate(

    Y( :Height ),

    X( :Age ),

    Fit Where( :HDDt == "Schoo_A", Fit Line( {Line Color( {213, 72, 87} )} ) ),

    Fit Where( :HDDt == "School_B", Fit Line( {Line Color( {64, 111, 223} )} ) )

)

If next time, I have 3 groups, School_A, School_B, School_C, do I have to manually add the

3rd fitting line, and choose the colors? I am hoping JMP script can choose color based on # of groups.

Thanks,

Qian

1 个已接受解答

已接受的解答
ms
Super User (Alumni) ms
Super User (Alumni)

Re: add fitting line using jmp script.

Bivariate() can have an optional Group By() argument.

An example:

Open( "$SAMPLE_DATA/Big Class.jmp" ) <<

Bivariate( Y( :weight ), X( :height ), Group by( :sex ), Fit line() );

在原帖中查看解决方案

3 条回复3
ms
Super User (Alumni) ms
Super User (Alumni)

Re: add fitting line using jmp script.

Bivariate() can have an optional Group By() argument.

An example:

Open( "$SAMPLE_DATA/Big Class.jmp" ) <<

Bivariate( Y( :weight ), X( :height ), Group by( :sex ), Fit line() );

xlin11
Level I

Re: add fitting line using jmp script.

what if remove the Fit line? is there any way to remove fit line from the plot?

ms
Super User (Alumni) ms
Super User (Alumni)

Re: add fitting line using jmp script.

In JMP 10 this syntax can be used to remove the first fitted line:

biv << (Curve[1] << Remove Fit);

推荐文章