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
 Forum for Origin C
 Two separated plots in one graph.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Stefan Bollmann

Germany
10 Posts

Posted - 09/22/2010 :  07:59:16 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 8.1 SR1
v8.1.13.88 (Academic)
Windows 7

Hi,

How can one plot one dataset (raw data from experiment) above and separated to another plotted dataset on one graph-page to compare both?

I do not know the solution without using Origin C, but would like to do it with written code for easier reuse.

Thanks for help,
Stefan Bollmann

Stefan Bollmann

Germany
10 Posts

Posted - 09/22/2010 :  08:59:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ok, i found out, that i can do it with graphpage_arrange_layers. But, what if i'd like to change the size of one of them?
Go to Top of Page

Penn

China
644 Posts

Posted - 09/25/2010 :  04:44:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Stefan Bollmann,

Do you mean change the size of the layer? If so, you can activate the graph and then select menu Format: Layer to open the Plot Details dialog. In the dialog, you can select the layer from the left panel, and then change the size in the Size/Speed tab of the right panel. Please refer to this page.

Penn
Go to Top of Page

Stefan Bollmann

Germany
10 Posts

Posted - 09/27/2010 :  02:40:49 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi and thanks Penn for this answer. I would like to do that with originc to work on 30 databases.
Go to Top of Page

Penn

China
644 Posts

Posted - 09/27/2010 :  03:50:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Stefan Bollmann,

In Origin C, the methods OriginObject::GetFormat and OriginObject::ApplyFormat can be used to get and set format for an Origin object. You can refer to the examples about how to access graph format with theme tree. The following code will set all the graph layers to be the same position and with the same size.

void testLayer()
{
	GraphLayer glActive = Project.ActiveLayer();
	if(!glActive)
		return;
	
	GraphPage gp(glActive.GetPage());
	if(!gp)
		return;
	
	foreach(GraphLayer gl in gp.Layers)
	{
		Tree trFormat;
		trFormat = gl.GetFormat(FPB_ALL, FOB_ALL, true, true);  // get theme tree
		trFormat.Root.Dimension.Left.dVal = 15.0; 
		trFormat.Root.Dimension.Top.dVal = 10.0;
		trFormat.Root.Dimension.Width.dVal = 30.0;
		trFormat.Root.Dimension.Height.dVal = 35.0;
		gl.ApplyFormat(trFormat, true, true);  // set the format tree to the graph layer	
	}
	//out_tree(trFormat);  // can print the theme tree to see the format
}


Penn
Go to Top of Page

Stefan Bollmann

Germany
10 Posts

Posted - 09/27/2010 :  05:12:50 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hey, that was good. Thanks again. Even if I once saw that help page I didn't know what to do with it. Now I know and these hints make me more productive.
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