cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

How to draw a graph with only one column of data? Is it possible to avoid adding auxiliary columns?

lala
Level VIII

Hello everyone!

I used the following script and added helper columns to plot only one column of data.

Is there a better way? Can we avoid adding helper columns? Thanks!

undefined

This post originally written in Chinese (Simplified) and has been translated for your convenience. When you reply, it will also be translated back to Chinese (Simplified).

1 ACCEPTED SOLUTION

Accepted Solutions
David_Burnham
Super User (Alumni)


Re: 只有一列数据如何作图?能不加辅助列吗?

 You can create a run chart.  You'll find it here: 

Analyze> Quality and Process> Control Chart> Run Chart

-Dave

View solution in original post

8 REPLIES 8
lala
Level VIII


回复: 只有一列数据如何作图?能加辅助列吗?

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << delete columns( 1 :: N Col( dt ) - 1 );
New Column( "no" );
Column( "no" ) << Formula( Row() );
dt << run formulas;
Column( "no" ) << deleteFormula;



Graph Builder(
	Size( 534, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :no ), Y( :weight ) ),
	Elements( Line( X, Y, Legend( 8 ) ) )
);
jthi
Super User


回复: 只有一列数据如何作图?能加辅助列吗?

Depends what you mean with a better way? If this is a common thing you do, you could create an addin/add script to jmps menus/toolbar which you could ran to do this. To create column you could use something like this (and if you want to create the graph builder always when script is ran, it can also be easily added):

Names Default To Here(1);

Local({dt},
	dt = Current Data Table();
	If(N Cols(dt) == 1,
		dt << New Column("no", Numeric, Ordinal, << Set Each Value(Row()))
	);
);

You can also add the column directly from New Columns:

jthi_0-1641461913221.png

Or create temporary column when using graph builder:

jthi_1-1641461963630.png

This column can be added to Data table if needed:

jthi_2-1641461996940.png

 

 

 

-Jarmo
lala
Level VIII

Reply: How to make a graph with only one column of data? Can you add an auxiliary column?

Understand, still need to add auxiliary columns.

 

thanks for your help!

This post originally written in Chinese (Simplified) and has been translated for your convenience. When you reply, it will also be translated back to Chinese (Simplified).

jthi
Super User


回复: 只有一列数据如何作图?能加辅助列吗?

In some visualizations you might be able to manage with enabling Row Order option

jthi_0-1641471493151.png

 

-Jarmo
lala
Level VIII

Reply: How to make a graph with only one column of data? Can you add an auxiliary column?

I imitate,

With only one column, you cannot get such a graphundefined

This post originally written in Chinese (Simplified) and has been translated for your convenience. When you reply, it will also be translated back to Chinese (Simplified).

lala
Level VIII


回复: 只有一列数据如何作图?能加辅助列吗?

JMP 15

David_Burnham
Super User (Alumni)


Re: 只有一列数据如何作图?能不加辅助列吗?

 You can create a run chart.  You'll find it here: 

Analyze> Quality and Process> Control Chart> Run Chart

-Dave
lala
Level VIII


Re: 只有一列数据如何作图?能不加辅助列吗?

Thanks Experts!

 

2022-01-06_221521.png