T O P I C R E V I E W |
Lou435 |
Posted - 02/14/2019 : 07:12:46 AM Origin Ver.2019: Operating System: Win7
I want to plot a xy diagram from a 3 column sheet. The third column is only needed to determine the range I want to plot. Let's assume the third column goes from -10 to +10. I only need all values between -5 and +5. But instead of plotting this range of column 3, I want to plot the same range of column 2 (however the range here is not based on values, but on equivalent positions to column 3).
Has anyone an idea how to solve this? Column 2 is changing for every new data set, so it cannot be used for defining a range.
For a scheme: x y1 y2 0,1 2 -10 0,2 4 -9 0,3 6 -8 0,4 8 -7 0,5 10 -6 ------------------ I want to plot x vs y1 from y2:-5/5 0,6 12 -5 0,7 14 -4 0,8 16 -3 0,9 18 -2 1,0 20 -1 1,1 22 0 1,2 24 1 1,3 26 2 1,4 28 3 1,5 30 4 1,6 32 5 ------------------- 1,7 34 6 1,8 36 7 1,9 38 8 2,0 40 9 2,1 42 10 |
2 L A T E S T R E P L I E S (Newest First) |
Lou435 |
Posted - 02/15/2019 : 07:51:50 AM This gives an error: "variable not defined:nend"
Can I say start from values bigger than -5 and end with values smaller than +5? |
Chris D |
Posted - 02/14/2019 : 11:26:28 AM You may try this little snippet:
int nstart = -5;
int nend = 5;
plotxy iy:=col(2)[index(nstart, col(3)):index(nend, col(3))];
You would simply change the valuer of nstart and nend as you need to.
If that range string doesn't work for the type of plot you are using let me know.
Thanks, Chris Drozdowski Originlab Technical Support
|
|
|