cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
faraz
Level I

How to add an average line to a bar plot

I am trying to add an average line to a bar plot and create a plot similar to the following picture:

faraz_0-1578423804647.png

 

So far I can only plot the bars and  when I am adding an extra column for average values to add to the plot, they will be plotted as an extra bar plot next to the original and I don't know how to change the format for this specific data set. Any help is appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to add an average line to a bar plot

Mark, not surprisingly, beat me to it. But since I had a response ready, here is another approach:

 

Graph > Graph Builder.

Drag response to Y zone.

Drag category variable to X zone.

Select the bar element.

Hold the shift key and select the Line element.

In the Line properties, click the Variables gray triangle and remove the checkbox for the X category variable.

 

Capture.JPG

Dan Obermiller

View solution in original post

2 REPLIES 2

Re: How to add an average line to a bar plot

Do you want something like this?

 

Capture.JPG

 

  • Select Graph > Graph Builder.
  • Drag response to Y drop zone.
  • Drag category to X drop zone.
  • Select the Bar element.
  • Right-click on response data column in list and select Aggregate > Mean.
  • Drag new Mean response column to frame just inside Y scale.
  • Right-click Y scale and select Move Right > Mean.
  • Right-click a bar and select Bar-right > Change to > Line.

 

Re: How to add an average line to a bar plot

Mark, not surprisingly, beat me to it. But since I had a response ready, here is another approach:

 

Graph > Graph Builder.

Drag response to Y zone.

Drag category variable to X zone.

Select the bar element.

Hold the shift key and select the Line element.

In the Line properties, click the Variables gray triangle and remove the checkbox for the X category variable.

 

Capture.JPG

Dan Obermiller