BookmarkSubscribe
Choose Language Hide Translation Bar
Occasional Contributor

## Means of multiple data subsets on a single graph

Hello

• I have two columns of data: Relative Time vs lb
• I would like to display two separate means of two separate data ranges on a single graph, I'd like to easily control the ranges of each subset
• I drew over my graph to better illustrate what I'm trying to achieve

Is this possible?

Thanks

2 REPLIES 2
Community Trekker

## Re: Means of multiple data subsets on a single graph

Here is possible trick:

Create a new ordinal column named PHASE and assign 1 to the Relative Time Range 1 and 2 to the Relative Time Range 2

Then, plot the Lb by Relative TIme with PHASE as an Overlay

Select both Dots and Line and that should give you what you want for any number of Phases

Graph Builder(
Variables( X( :Relative Time ), Y( :Lb ), Overlay( :PHASE ) ),
Elements( Line Of Fit( X, Y, Legend( 6 ) ), Points( X, Y, Legend( 7 ) ) )
);

Let me know if this is what you were looking for.

Cheers,

TS

Thierry R. Sornasse
Highlighted
Staff

## Re: Means of multiple data subsets on a single graph

Another approach if you wish to dynamically choose where the phase occurs. I also will use the Control Chart Builder and the Global Data Filter.

Create a variable called PHASE that has the formula: If( Selected(), 1, 2 ).

Now go to the Control Chart Builder.

Drag Ib to the Y zone. Drag your Relative Time to the X-axis. Drag PHASE into the phase area at the top of the chart.

Now choose Rows > Data Filter. Specify your Relative Time as the filter. Drag the triangle for the upper end of Relative Time to various locations and watch the control charts get adjusted for the various "cut points".

You could also use Graph Builder with the Overlay as Thierry_S mentioned instead of the Control Chart Builder.

Dan Obermiller