The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Plotting a range of values

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000