Subscribe Bookmark RSS Feed

how do I create a bar chart with a regression line?


Community Trekker


Oct 23, 2013

we want to use an numeric/ordinal column and a numeric/continuous column to populate a vertical bar chart, with the former on the x axis and latter on the y axis

this is amazingly easy in jmp, done in 20 seconds

now we want to fit a regression line to the tops of the bars, ie the data

this is amazingly hard in jmp, cant figure it out -- has to do with the ordinal data on the x axis, but... does this mean it's impossible?

help? thanks


Community Manager


Jun 23, 2011

You're right that having a categorical (ordinal) column on the axis is the problem. JMP doesn't want to fit a regression line to categorical data.

However, if you change the modeling type to of your X axis variable to Continuous, you can still plot the bar chart and get the regression line.

In the picture below I've changed the modeling type of the Age column in Big Class from Ordinal to Continuous and then created the graph you're looking for.