Graph not scaling


Breitling

Recommended Posts

Hi all...

I'm trying to plot an XY graph. Y Expresion and X Expresion are both calculated global variables in a sequence. They both represent angles: elevation (y axis) and azimuth (x axis). I have scaled left axis (y) from 0 to 90, botom axis (x) from 60 to 300. Both linear, and no "Time Width" for the botom axis, both thawed.

Why can't I manage to show the correct graph? see the result in attached image for values: y=15.7 x=115

Thanks.

post-63-1207203857_thumb.jpg

Link to comment
Share on other sites

More than likely you are inadvertantly trying to plot scalars. One or both your expressions are resulting in a single value instead of an array of values. The graph, for obvious reasons, can't draw a graph of a single value and unfortunately also does not scale properly when it can't properly graph.

What I'd do is this: open the properties for the graph, go to the Y Expression and then hit the F6 key to open the big expression window. At the bottom is the result of the expression as typed. If one value is shown you have found your problem and will have to edit the expression to result in an array. If you see an array, close the window and do the same with the X expression.

There are other possibilities, such as expressions that result in strings instead of numbers, but the scalar thing is the most common problem, and is usually caused by putting [0].

Link to comment
Share on other sites

Thank you very much. Finally I solved assigning these variables to V.channels, storing a value each minute. Now it graphs ok, plotting the virtual channels.

One more question, if you don't mind. What I'm plotting is sun location in the sky. I would like to make a line plot, with a point plot only in the last position, like in the attached image (edited to add the "sun"). Is it possible? I went though many plotting combinations without success.

Thanks.

post-63-1207203905_thumb.jpg

Link to comment
Share on other sites

That requires a bit of a trick. What you do is create a new trace with identical X and Y expressions, except with [0] at the end. I know I just said that you can't plot scalars, but as long as one of the traces is not a scalar its ok. Assign this new trace to the Right Axis 1 instead of Left Axis 1. Then go to the axes tab, and change the Right Axis from Line to Point. You'll probably want to go to the general tab and increase the point size, and perhaps change the point type in the trace tab. I've attached a sample.

graphwithdot.ctl

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.