The Origin Forum
File Exchange
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Save Password
 All Forums
 Origin Forum for Programming
 Forum for Automation Server/COM and LabVIEW
 Grouping data and reconstructing legend (MATLAB)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic


11 Posts

Posted - 01/27/2016 :  1:43:19 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic

I can't find any documentation about grouping data. I want to be able to establish from matlab what my groups are, so that line colors can automatically be incremented.

Once the data is grouped, I'd like to re-issue a legend reconstruction command (like Ctrl + L in the Origin GUI), so that the legend updates to reflect the color changes and grouping.

Does anyone know the commands that make this possible?


Origin Ver. 2016
Operating System: Win10


11 Posts

Posted - 01/27/2016 :  1:55:50 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
So it turns out LabTalk commands are really useful:

Data sets can be grouped using the following LabTalk command:
invoke(graphLayer, 'Execute', 'layer -g [BeginIndex EndIndex];');

If you leave out the '[BeginIndex EndIndex]' part, all datasets in the active layer will be grouped.

Reconstructing the legend can be completed with the following command:

invoke(graphLayer, 'Execute', 'legend -r;');

Edited by - sudd0030 on 01/27/2016 2:03:31 PM
Go to Top of Page


11 Posts

Posted - 11/06/2016 :  2:15:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I've been revisiting this, and I'm trying to group data with the command:

invoke(graphLayer, 'Execute', 'layer -g [BeginIndex EndIndex];');

As I stated in my previous post, this command works fine to group all the data:

invoke(graphLayer, 'Execute', 'layer -g;');

But if I want to have two groups within one layer (I don't want to have multiple layers) as soon as I add the '[BeginIndex EndIndex]' part, nothing works. I've tried indexing starting at 0 and at 1 (labtalk generally starts at 1 for indexing).

Anyone have insight on how this works?
Go to Top of Page


6 Posts

Posted - 12/13/2017 :  10:15:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
A legend is a narrative of human actions that are perceived both by teller and listeners to take place within human history and demonstrating human values, and which possesses certain qualities that give the tale verisimilitude. Legend, for its active and passive participants, includes no happenings that are outside the realm of "possibility," but may include miracles. Legends may be transformed over time, in order to keep them fresh and vital, and realistic. Many legends operate within the realm of uncertainty, never being entirely believed by the participants, but also never being resolutely doubted.

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 © 2008 Originlab Corporation Go To Top Of Page
Snitz Forums 2000