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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Hide Label in Second Layer
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Lou325

3 Posts

Posted - 12/18/2019 :  02:30:41 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Good morning,

I am hiding the label of the y-axis via layer.y.showLabels=0 and it is perfectly working. However, if I add a second layer as y2, I am not able to hide the label of y2. The same command with y2 does not work. What is the problem and how can I solve it?




Origin Ver.9.6.0.172; Operating System: Win 10 Enterprise

yuki_wu

896 Posts

Posted - 12/18/2019 :  05:03:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

layer.property notation is used to access the active’s layer’s properties.
If you want to access other layers’ properties, you can define a layer range first like:
range layer2nd = [Graph1]2!
Layer2nd.y.showLabels=0

Hope it helps.

Regards, Yuki
OriginLab
Go to Top of Page

Lou325

3 Posts

Posted - 12/18/2019 :  09:47:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Yuki,

your recommendation works, if the plot is already existing. However, I'd like to include both layers in a new plot right from the data set. This means I do not know the name of the plot as it is not existing yet.
I am using following code:

plotxy iy:=(1,2) plot:=200;
layer.y.showLabels=0;
layer -n Y;

For the second layer the command showLabels=0 does not work and the graph does not have a name yet.
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 12/18/2019 :  8:37:29 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
There are two ways to act on another layer that is not active

1. use layer -o command, like

layer -o 2 {layer.y.showlabels=0;};


2. In Yuki's example, you can skip the window name if you are operating on the active window, so

range layer2nd = 2!;
Layer2nd.y.showLabels=0;


CP
Go to Top of Page

aplotnikov

Germany
169 Posts

Posted - 12/19/2019 :  05:14:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi cpyang,

quote:
There are two ways

What about the third one:
layer2.y.showLabels=0;

?

BR,
Alex
Go to Top of Page

Lou325

3 Posts

Posted - 12/19/2019 :  05:26:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The first one works, thanks!

The third one does not, I tried it before

Edited by - Lou325 on 12/19/2019 05:27:40 AM
Go to Top of Page

aplotnikov

Germany
169 Posts

Posted - 12/19/2019 :  05:42:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Lou325,

the third way works properly - I tried it with three different versions of Origin before I suggested it.


BR,

Alex
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000