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 merge the specified 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

ytyyutianyun

48 Posts

Posted - 02/21/2012 :  02:35:37 AM  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

I want to merge the graphs as follows:

1st picture: graph1+graph51 (matrix£¨1,2£©)

2nd picture: graph2+graph52 (matrix£¨1,2£©)
.
.
.

50th picture: graph49+graph100 (matrix£¨1,2£©)

How to do it .Thanks

ytyyutianyun

48 Posts

Posted - 02/21/2012 :  02:37:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I'm sorry .But the topic can't be edited

Modified:

50th picture: graph50+graph100 (matrix£¨1,2£©)
Go to Top of Page

Penn

China
644 Posts

Posted - 02/21/2012 :  04:47:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

There seems no LabTalk command for merging graph directly in Origin 7.5. However, you can try to plot all the data to one graph (into different layer) first, and then rearrange the positions of the layers. The following LabTalk script shows how to plot data into one graph with different layers.

window -t p;  // create an empty graph, with one layer
for(ii = 1; ii < 7; ii++)  // assume there are 6 worksheets, from Data1 to Data6
{
	if(ii != 1)
	{
		layer -n;  // if not the first time, add a new layer
	}	
	layer -i Data$(ii)_B;  // add column B in Dataii worksheet into the layer
	// The layer settings script can be added here
}

After create such graph, you can rearrange the layers in the graph. You can refer to this macro.

If all the graphs in the project need to be merged, maybe you can use the window -m command to merge all graphs first, and then rearrange the layer positions.

By the way, for so many graphs, I am afraid the result will not look so good.

Penn
Go to Top of Page

ytyyutianyun

48 Posts

Posted - 02/21/2012 :  05:22:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
There seems no LabTalk command for merging graph directly in Origin 7.5


It seems the higher version can do it. Can you tell me how to do it.
I'll try the demo . Thanks
Go to Top of Page

Penn

China
644 Posts

Posted - 02/22/2012 :  05:00:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

If using Origin C, you can refer to the example I posted before.

For LabTalk, you can try the merge_graph X-Function.

Penn
Go to Top of Page

ytyyutianyun

48 Posts

Posted - 02/22/2012 :  05:11:58 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks,Penn
Whenever I was in trouble, you would help me.Thanks
Go to Top of Page

ytyyutianyun

48 Posts

Posted - 02/23/2012 :  10:30:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I run the script,but error,why?

merge_graph option:=specified row:=50 col:=2 graphs:="Graph1"+"Graph51"+"Graph2"+"Graph52"+"Graph3"+"Graph53"+"Graph4"+"Graph54"+"Graph5"+"Graph55"+"Graph6"+"Graph56"+"Graph7"+"Graph57"+"Graph8"+"Graph58"+"Graph9"+"Graph59"+"Graph10"+"Graph60"+"Graph11"+"Graph61"+"Graph12"+"Graph62"+"Graph13"+"Graph63"+"Graph14"+"Graph64"+"Graph15"+"Graph65"+"Graph16"+"Graph66"+"Graph17"+"Graph67"+"Graph18"+"Graph68"+"Graph19"+"Graph69"+"Graph20"+"Graph70"+"Graph21"+"Graph71"+"Graph22"+"Graph72"+"Graph23"+"Graph73"+"Graph24"+"Graph74"+"Graph25"+"Graph75"+"Graph26"+"Graph76"+"Graph27"+"Graph77"+"Graph28"+"Graph78"+"Graph29"+"Graph79"+"Graph30"+"Graph80"+"Graph31"+"Graph81"+"Graph32"+"Graph82"+"Graph33"+"Graph83"+"Graph34"+"Graph84"+"Graph35"+"Graph85"+"Graph36"+"Graph86"+"Graph37"+"Graph87"+"Graph38"+"Graph88"+"Graph39"+"Graph89"+"Graph40"+"Graph90"+"Graph41"+"Graph91"+"Graph42"+"Graph92"+"Graph43"+"Graph93"+"Graph44"+"Graph94"+"Graph45"+"Graph95"+"Graph46"+"Graph96"+"Graph47"+"Graph97"+"Graph48"+"Graph98"+"Graph49"+"Graph99"+"Graph50"+"Graph100"

Edited by - ytyyutianyun on 02/24/2012 08:28:48 AM
Go to Top of Page

Penn

China
644 Posts

Posted - 02/28/2012 :  01:14:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

The graphs variable is given the wrong syntax. For multiple graphs, you can use the %(LF) as the delimiter. For example:

string str$ = "Graph1%(LF)Graph51%(LF)Graph2%(LF)Graph52";  // the graphs to be merged
merge_graph option:=specified row:=50 col:=2 graphs:=str$;


Penn
Go to Top of Page

ytyyutianyun

48 Posts

Posted - 02/29/2012 :  02:31:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks,I know
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