The Origin Forum
File Exchange
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Automation Server/COM and LabVIEW
 Grouping data and reconstructing legend (MATLAB)

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List

* Forum Code is ON
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

Check here to subscribe to this topic.

T O P I C    R E V I E W
sudd0030 Posted - 01/27/2016 : 1:43:19 PM

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
3   L A T E S T    R E P L I E S    (Newest First)
n/a Posted - 12/13/2017 : 10:15:39 AM
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.

sudd0030 Posted - 11/06/2016 : 2:15:24 PM
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?
sudd0030 Posted - 01/27/2016 : 1:55:50 PM
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;');

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000