cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-240379%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EC%C3%B3mo%20agregar%20una%20l%C3%ADnea%20promedio%20a%20un%20gr%C3%A1fico%20de%20barras%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-240379%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EEstoy%20tratando%20de%20agregar%20una%20l%C3%ADnea%20promedio%20a%20un%20gr%C3%A1fico%20de%20barras%20y%20crear%20un%20gr%C3%A1fico%20similar%20a%20la%20siguiente%20imagen%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22faraz_0-1578423804647.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22faraz_0-1578423804647.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22faraz_0-1578423804647.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F20870i5C530048D574B08E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22faraz_0-1578423804647.png%22%20alt%3D%22faraz_0-1578423804647.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHasta%20ahora%2C%20solo%20puedo%20trazar%20las%20barras%20y%20cuando%20agrego%20una%20columna%20adicional%20para%20que%20los%20valores%20promedio%20se%20agreguen%20al%20gr%C3%A1fico%2C%20se%20trazar%C3%A1n%20como%20un%20gr%C3%A1fico%20de%20barra%20adicional%20junto%20al%20original%20y%20no%20s%C3%A9%20c%C3%B3mo%20cambiar%20el%20formato%20para%20este%20conjunto%20de%20datos%20espec%C3%ADfico.%20Cualquier%20ayuda%20es%20apreciada.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-240394%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Como%20agregar%20una%20linea%20promedio%20a%20un%20diagrama%20de%20barras%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-240394%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EMark%2C%20como%20era%20de%20esperar%2C%20se%20me%20adelant%C3%B3.%20Pero%20como%20ten%C3%ADa%20una%20respuesta%20lista%2C%20aqu%C3%AD%20hay%20otro%20enfoque%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGr%C3%A1fico%20%26gt%3B%20Creador%20de%20gr%C3%A1ficos.%3C%2FP%3E%0A%3CP%3EArrastre%20la%20respuesta%20a%20la%20zona%20Y.%3C%2FP%3E%0A%3CP%3EArrastre%20la%20variable%20de%20categor%C3%ADa%20a%20la%20zona%20X.%3C%2FP%3E%0A%3CP%3ESeleccione%20el%20elemento%20de%20la%20barra.%3C%2FP%3E%0A%3CP%3EMantenga%20presionada%20la%20tecla%20May%C3%BAs%20y%20seleccione%20el%20elemento%20L%C3%ADnea.%3C%2FP%3E%0A%3CP%3EEn%20las%20propiedades%20de%20L%C3%ADnea%2C%20haga%20clic%20en%20el%20tri%C3%A1ngulo%20gris%20Variables%20y%20elimine%20la%20casilla%20de%20verificaci%C3%B3n%20de%20la%20variable%20de%20categor%C3%ADa%20X.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture.JPG%22%20style%3D%22width%3A%20557px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.JPG%22%20style%3D%22width%3A%20557px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.JPG%22%20style%3D%22width%3A%20557px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F20872iA841F229C177099E%2Fimage-dimensions%2F557x428%3Fv%3Dv2%22%20width%3D%22557%22%20height%3D%22428%22%20role%3D%22button%22%20title%3D%22Capture.JPG%22%20alt%3D%22Capture.JPG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-240391%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Como%20agregar%20una%20linea%20promedio%20a%20un%20diagrama%20de%20barras%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-240391%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%C2%BFQuieres%20algo%20como%20esto%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture.JPG%22%20style%3D%22width%3A%20712px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.JPG%22%20style%3D%22width%3A%20712px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.JPG%22%20style%3D%22width%3A%20712px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F20871i04FAF06959FB11B0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Capture.JPG%22%20alt%3D%22Capture.JPG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ESeleccione%20Gr%C3%A1fico%20%26gt%3B%20Creador%20de%20gr%C3%A1ficos.%3C%2FLI%3E%0A%3CLI%3EArrastre%20la%20respuesta%20a%20la%20zona%20de%20colocaci%C3%B3n%20Y.%3C%2FLI%3E%0A%3CLI%3EArrastre%20la%20categor%C3%ADa%20a%20la%20zona%20de%20colocaci%C3%B3n%20X.%3C%2FLI%3E%0A%3CLI%3ESeleccione%20el%20elemento%20Barra.%3C%2FLI%3E%0A%3CLI%3EHaga%20clic%20con%20el%20bot%C3%B3n%20derecho%20en%20la%20columna%20de%20datos%20de%20respuesta%20en%20la%20lista%20y%20seleccione%20Agregado%20%26gt%3B%20Promedio.%3C%2FLI%3E%0A%3CLI%3EArrastre%20la%20nueva%20columna%20de%20respuesta%20media%20al%20marco%20justo%20dentro%20de%20la%20escala%20Y.%3C%2FLI%3E%0A%3CLI%3EHaga%20clic%20con%20el%20bot%C3%B3n%20derecho%20en%20la%20escala%20Y%20y%20seleccione%20Mover%20a%20la%20derecha%20%26gt%3B%20Promedio.%3C%2FLI%3E%0A%3CLI%3EHaga%20clic%20con%20el%20bot%C3%B3n%20derecho%20en%20una%20barra%20y%20seleccione%20Barra%20derecha%20%26gt%3B%20Cambiar%20a%20%26gt%3B%20L%C3%ADnea.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
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

Recommended Articles