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
 stacked lines by Y offset Graph

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
gzforever Posted - 11/09/2016 : 8:12:31 PM
Hello everyone,

I am writing the scripts to make my work faster. I want to do a specific type of Graph. I Imported all required files with my srcipt, but i have no idea how to draw properly the stacked lines by Y offset Graph. I did this manually:


I want do the same in my script.

Kind regards,
JZ
7   L A T E S T    R E P L I E S    (Newest First)
yuki_wu Posted - 12/12/2016 : 10:33:52 PM
Hi JZ,

The stacked lines is drawn by a group. When you reverse the order of the data plots, the data plots will be ungroup at the same time. Thus, you need to group them again:

layer -r;//reverse the order of the data plots 
layer -g;//group the data plots

Hope it helps.

Regards,
Yuki
OriginLab
gzforever Posted - 12/12/2016 : 6:12:22 PM
Hello,

One more question to this topic. Can i somehow revert the order of the curves on this kind of graph ?

Currently i am sorting the columns. I wonder if i can do this some other way.

layer -r doesn't work correctly in OffsetStackY template.

Kind Regards,
JZ
yuki_wu Posted - 12/05/2016 : 01:29:13 AM
Hi JZ,

You’d better add a pause before rescale. For example:


sec -p 1;// pause for 1 second
rescale;

Hope it helps.

Regards,
Yuki
OriginLab
gzforever Posted - 12/03/2016 : 11:56:06 AM
Hi yuki,

I found strange problem - Graph (stacked lines by offset from this topic) works fine in my origin 2016 (home), but in origin 2015 (lab) the graph isn't rescaled properly. Of course i found the solution, which works. However i wanted to understand something, what doesn't let me sleep :D

I have sections in my code, when i use rescale command right after creating and formating graph - it doesn't work. I have to use this command in the next iteration of loop or after creating last graph (to rescale the last one). The code is big, but it work fine, the only thing i dont get is Rescale command bahavior.

The code is very long (130 lines) so i put it on the webside for coders (just look for rescale in this code - i describe everthing):

http://wklej.org/id/2978190/

Regards,
JZ
yuki_wu Posted - 11/13/2016 : 10:03:19 PM
Hi JZ,

I am afraid that there is no easy way to change the properties of all stacked lines at one time.

Since the stacked lines is drawn by a group. If you want to reset their colors, you need to ungroup them and change their colors one by one.

However, the colors may turn back to the original colors when you group it again.

I am sorry that I do not find a good way for now.

Yuki
OriginLab
gzforever Posted - 11/10/2016 : 09:55:23 AM
Hi Yuki,

Thanks for your help. I added your scripts to my code and it works fine!

However there is one detail i really want to change:

Appearance of the curves from my graph:


I want them to look like these: (Made in Origin manually):


Is there some easy way to change the color/width of all curves in active layer ? I only know how to do it one by one .

Kind Regards,
JZ
yuki_wu Posted - 11/10/2016 : 02:11:39 AM
Hi JZ,

For the stacked lines by Y offset, you can try the following scripts:

//Set the specified range to be the current selection 
//(Syntax: worksheet -s c1 r1 c2 r2)
worksheet -s 1,4,0,0; 
//Plot stacked lines by Y offset
worksheet -p 200 OffsetStackY; 

Note: To select entire columns, set r1 and r2 to zero.

More information of using Worksheet command to set various formatting options, such as -s and -p, could be found here:
http://www.originlab.com/doc/LabTalk/ref/Worksheet-cmd

Regards,
Yuki
OriginLab

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