Jump to content

Scatter plot - lines and curves - line width depending on column value


Spencer Alexander

Recommended Posts

Hello,

I am trying to add a horizontal line (curve from data table would also work) on a scatter plot, with y-value equal tothe average value of a variable. I also want to have a shaded region around around that line, corresponding to the standard deviation of the variable.

One way I can think to do this is to plot both of two horizontal lines:

1. The horizontal line with the average y-value (currently populated through a column of a data table, 'var_avg'),a small line width, and a solid color.

2. The horizontal line with the average y-value (currently populated through a column of a data table, 'var_avg'), a line width corresponding to the standard deviation (this I could populate as e.g., another column in the data table, 'var_std'), and a transluscent color.

However, I do not know how to make a line width that depends on a column value. Is there a way that I can do this

Alternatively, is there another entirely different way that I could accomplish my goal

Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...