Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Point Line

Status
Not open for further replies.

macmet

Materials
Jul 18, 2005
863
0
0
CA
Hello Everyone,

I make a lot of scatter graphs where I compare temperatures to their setpoints using Excel.

I'm wondering if there is a way to mark the set point on the graph as an option? What I've been doing is either drawing a line or adding a set point temperature column in my data. I do not want to add a trendline.

Is there a better way to do this? I've tried Google, but not really sure the best keywords to use. I keep getting sent back to trendlines.
 
Replies continue below

Recommended for you

Prone to error without doubt...

Good point MJ. Just to need to make sure it spans my entire data set.



You would have thought it would be easy to do this, but apparently not.
 
That seems to be the only way: The example worksheet uses a full column; unfortunately, the sheets are hidden.

TTFN
faq731-376
7ofakss
 
You could use VBA to add a setpoint series.

Essentially it would be the same as adding a setpoint series, just bypassing the need to have a column for the data.
 
Thanks everyone. I was hoping I was overlooking everyone something simple. Maybe the next version of Excel will allow for it.


Cheers.
 
A crude start for proof of concept.

Code:
Public Function CreateSetLine()

Setmax = ActiveChart.Axes(xlValue).MaximumScale
Setmin = ActiveChart.Axes(xlValue).MinimumScale

SetValue = CDbl(InputBox("Set Point"))

ActiveChart.SeriesCollection.NewSeries.Name = "SetPoint"

ActiveChart.Axes(xlValue).MaximumScaleIsAuto = False

With ActiveChart.SeriesCollection("SetPoint")
    .XValues = Array(Setmin, Setmax)
    .Values = Array(SetValue, SetValue)
    .ApplyDataLabels ShowSeriesName:=True
End With
End Function
 
Pmover,

Are you saying just use a column or row with the setpoint value in the data set? If not, can you please explain further?

 
in using DRWeig's file, simply delete the setpoint values in the workbook and the setpoint line will not be displayed. if the setpoint values are to be displayed, then have the value displayed. initially, i thought the setpoint was a single point (x,y).

a suggestion is to have a cell which is a zero (0 = false) or one (1 = true). the cells with setpoints will need a formula to either display the setpoint value or nothing at all, depending upon the value with a 0 or 1.

another suggestion is to plot a series with only the min & max x-values and have the setpoint as y-values for min/max x-values. this would allow for a single line across the chart.

another suggestion is to place the chart on a chart-sheet (if not there). the switch to the developer tab and insert a check box onto the chart which is linked to the cell with a 0 or 1. while viewing the chart, selecting the check box will display the chart and vice versa. additionally, a scroll bar or spin button can be inserted/overlayed on chart to change the value of setpoint (will need to define the setpoint range (right-click the scroll bar to get the sub menu and select format control).

enough thinking for now . . .

hope this helps and good luck!
-pmover
 
Status
Not open for further replies.
Back
Top