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
 Origin Forum
 Function graph legend
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

acerola

4 Posts

Posted - 05/23/2014 :  5:08:40 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
How do I change the function graph legend, so that when I reconstruct the legend it doesn't revert back to F1, F2, etc?
I am using Origin 9.1.

Shirley_GZ

China
Posts

Posted - 05/26/2014 :  01:32:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
When you open the Create 2D/3D Function Plot dialog, go to Label tab, set Long Name for Y/Z, then the legend will show the long name.

Is this what you want?

Originlab Technical Service Team
Go to Top of Page

acerola

4 Posts

Posted - 05/26/2014 :  10:57:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
That works for creating a new function plot in a new graph. But how to change the long name for an already existing function plot? Or how to add a function plot to an existing graph and change its long name?
Go to Top of Page

Shirley_GZ

China
Posts

Posted - 05/26/2014 :  10:01:22 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
With the graph window active, run

set F1 -n Plot_1;


in Command window or script window, then click Refresh button. The long name will update.

Originlab Technical Service Team
Go to Top of Page

acerola

4 Posts

Posted - 05/27/2014 :  3:50:35 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This changed the name of the object but not its long name. I need to change the long name to something like "curve O(h2)".
Go to Top of Page

Shirley_GZ

China
Posts

Posted - 05/28/2014 :  01:37:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Please follow below steps to change the long name:
1. Copy the below script lines to a new C file in Code Builder, save and Compile it:
void SetDatasetLongName(string dsName, string strLN)
{
	DatasetObject dsObj(dsName);
	if (dsObj)
		dsObj.SetLabel(strLN, RCLT_LONG_NAME, FALSE);
}

2. Go back to Origin workspace, in the Script Window or Command window, run the below script line to call the function defined above in Labtalk :
SetDatasetLongName("F1", "somename");


Originlab Technical Service Team

Edited by - Shirley_GZ on 05/28/2014 01:58:52 AM
Go to Top of Page

acerola

4 Posts

Posted - 05/28/2014 :  3:08:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It works. Thank you.

I would like to suggest that the option to change the long name be included in the GUI. The solution you provided works fine, but it is very complicated.
Go to Top of Page

snowli

USA
1379 Posts

Posted - 05/28/2014 :  3:47:14 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

Yes. We have jiraed to improve this in new version.
https://originlab.jira.com/browse/ORG-11247


Right now we have 4 function plot types:
1. 2D funtion plot
2. 2D parametric function plot
3. 3D function plot
4. 3D parametric function plot.

2, 3, 4 are newly added and worksheet/matrix is created together with plot. So user can easily modify long name, units, etc. in worksheet/matrix and have graph updated.

1 is old way so no data is created when function is plotted and that caused difficulty in renaming, getting to data, etc. We will improve it so that for 1, it's easier to create data and modify the long name, etc. as well.

Thanks, Snow


Edited by - snowli on 05/28/2014 3:56:41 PM
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