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
 How to delete and add the texts in the graphs
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ytyyutianyun

48 Posts

Posted - 02/21/2012 :  9:20:43 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver.7.5 and Service Release sp5(Select Help-->About Origin):
Operating System:windows 7

I have created 100 graphs
1.I want to delete all the texts(not axis label) in the graphs to make clean
2.Add the custom variables ineach graph.
1st graph text : "X/d=6"
2nd graph text : "X/d=16"
3rd graph text : "X/d=26"
All in all"X/d="is fixed and "6","16"...is varied by the numbers of the graph which express:
N=10*i-4. N is "6","16"... i is the numbers of the graphs
Thanks

For example

Delete -pppp

Add the text "X/d=6"

Sam Fang

293 Posts

Posted - 02/22/2012 :  03:42:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If all the texts use default names, you can use the following script to delete all texts.
label -ra text;


To add a text in each graph, you can use a loop, and activate each graph using script, then use the following script to create a text object.

i=1;
doc -e P
{
label -s "x/d=$(10*i-4)";
i++;
}


Sam
OriginLab Technical Services
Go to Top of Page

ytyyutianyun

48 Posts

Posted - 02/22/2012 :  05:07:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks,but doc -e P means printing the contents of all graph windows
And how can I add text in specified graphs.
For example

I want to add text only in graph 1 to graph 8 from 100 graphs

loop (i, 1, 8);
{
label -s "x/d=$(10*i-4)";
}

?

And then can I put the text in the position I want

Thanks
Go to Top of Page

Sam Fang

293 Posts

Posted - 02/22/2012 :  9:25:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It can be as follows.

loop (i, 1, 8);
{
win -a "Graph$(i)";
label -s -p 90 5 "x/d=$(10*i-4)";
}


For -p, x and y represent the percent distance from the top left corner of the layer frame.

Sam
OriginLab Technical Services
Go to Top of Page

ytyyutianyun

48 Posts

Posted - 02/22/2012 :  9:38:57 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks.

In 7.5
loop (i, 1, 8) {
win -a "Graph$(i)";
label -s -p 90 5 "x/d=$(10*i-4)";
}
is right
Thanks for helping
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