Simple Plotting Question

Xenoun

Board Regular
Joined
Feb 15, 2011
Messages
63
Hello,
I'm just wondering if its able to plot a horizontal line on a graph at a specific value. i.e. y=4. I'm currently just plotting two points and letting the graph add the line between them, but it would be much more useful if excel had a way of automatically plotting a horizontal line at a spicified point.

Does this exist, or am I just wishing for something that isn't there? I'm using Excel 2007 if that helps

Thanks

Edit: I'm using a scatterplot aswell, didn't state it earlier
 
Last edited:

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,115
Sure you can do this, if you're willing to set up a separate data series for the line.
 

tusharm

MrExcel MVP
Joined
May 28, 2002
Messages
11,029
Excel doesn't have an 'automatic' way of creating a horizontal line. How would it know where to put the line?

You can do what you are doing or in some cases you can adjust the major (or even the minor) unit of the y-axis to get a horizontal line.
Hello,
I'm just wondering if its able to plot a horizontal line on a graph at a specific value. i.e. y=4. I'm currently just plotting two points and letting the graph add the line between them, but it would be much more useful if excel had a way of automatically plotting a horizontal line at a spicified point.

Does this exist, or am I just wishing for something that isn't there? I'm using Excel 2007 if that helps

Thanks

Edit: I'm using a scatterplot aswell, didn't state it earlier
 

Xenoun

Board Regular
Joined
Feb 15, 2011
Messages
63
Excel doesn't have an 'automatic' way of creating a horizontal line. How would it know where to put the line?

You can do what you are doing or in some cases you can adjust the major (or even the minor) unit of the y-axis to get a horizontal line.



It would know where to put the line if you could specify the equation of the line.

I'll just leave it how I have it then, was thinking that excel didn't have this feature but wanted to check just in case
 

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,115

ADVERTISEMENT

Like I said, why not use a separate data series to draw the line ?
 

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,115

ADVERTISEMENT

OK sorry, so what's the difference between doing one via a chart series, and what you want ?
 

Xenoun

Board Regular
Joined
Feb 15, 2011
Messages
63
The charts i'm doing are trend charts and as such they will grow larger over time. The series I have for the horizontal line uses the first date and the last date to plot two points and then I have a trendline joining them as im using the scatterplot which is just dots.

When the trend chart becomes larger the horizontal line will stay the same length unless I edit the series and change the final date. I wanted to avoid doing this and was asking if there's a way for to get excel to plot a horizontal line for me without data points
 

tusharm

MrExcel MVP
Joined
May 28, 2002
Messages
11,029
It helps to ask the question you really want resolved and not what you think people can help with. {grin}

Suppose your x-values (dates) are in column A. Then, for the 2nd series you are using for a horizontal line, use the following: for the 1st x-value use =MIN(A:A) and for the 2nd x-value use =MAX(A:A).

You can even have the horizontal line span the entire width of the plot area but that's a little more work.

This will ensure your
The charts i'm doing are trend charts and as such they will grow larger over time. The series I have for the horizontal line uses the first date and the last date to plot two points and then I have a trendline joining them as im using the scatterplot which is just dots.

When the trend chart becomes larger the horizontal line will stay the same length unless I edit the series and change the final date. I wanted to avoid doing this and was asking if there's a way for to get excel to plot a horizontal line for me without data points
 

Xenoun

Board Regular
Joined
Feb 15, 2011
Messages
63
Thanks, that'll work. I was thinking there may have been something like that when I was writing my last reply but i've been too busy since then to look into it
 

Forum statistics

Threads
1,141,015
Messages
5,703,746
Members
421,312
Latest member
Mooncake1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top