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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Read displayed graph legend text

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

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
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
hofmaale Posted - 07/13/2017 : 05:43:17 AM
Dear all,

is there a possibility to get the processed and displayed legend text?

So far I know to different options:
a) iterate through all DataPlots and execute the GetLegend() command. This will print a list of possible, standard legend texts, but for all plots - not only those actually appearing in the legend
b) search for the Legend object by iterating over all GraphObjects in the active layer. In this case, one can get the unsubstituted legend text

What I'm searching for is some fictonal option c) to read the displayed legend text, i.e. the actual contents of the legend-object but after legend-text substitution is done.

Is there a way to accomplish this?

Thank you very much in advance,

Alex


Origin Ver. and Service Release (Select Help-->About Origin): 2017G SR1
Operating System: Win 7 x64
3   L A T E S T    R E P L I E S    (Newest First)
hofmaale Posted - 07/19/2017 : 03:49:36 AM
quote:
Originally posted by cpyang

Are you trying to get the column longname or comments from a plot?


Nope.

quote:
Originally posted by Castiel

[...]
okutil_arg_copy
[...]


Thanks - that was what I was looking for!
Castiel Posted - 07/14/2017 : 01:51:02 AM
quote:
Originally posted by hofmaale

Dear all,

is there a possibility to get the processed and displayed legend text?

So far I know to different options:
a) iterate through all DataPlots and execute the GetLegend() command. This will print a list of possible, standard legend texts, but for all plots - not only those actually appearing in the legend
b) search for the Legend object by iterating over all GraphObjects in the active layer. In this case, one can get the unsubstituted legend text

What I'm searching for is some fictonal option c) to read the displayed legend text, i.e. the actual contents of the legend-object but after legend-text substitution is done.

Is there a way to accomplish this?

Thank you very much in advance,

Alex


Origin Ver. and Service Release (Select Help-->About Origin): 2017G SR1
Operating System: Win 7 x64



OC_API int okutil_arg_copy(string* pstr, LPCSTR lpcszPageLayerContext=NULL, USHORT cntrl=0);



     #####
    #### _\_  ________
    ##=-[.].]| \      
    #(    _\ |  |------|
     #   __| |  ||||||||
      \  _/  |  ||||||||
   .--'--'-. |  | ____ |
  / __      `|__|[o__o]|
_(____nm_______ /____\____ 
cpyang Posted - 07/13/2017 : 11:00:18 PM
Are you trying to get the column longname or comments from a plot?

From LabTalk, you can get the actual legend display text by simply

string str$ = "%(1)";
str.=


but to get anything else from the plot (by index, 1,2,3), you can read this

http://originlab.com/doc/LabTalk/ref/Legend-Substitution-Notation#List_of_.40Options

CP

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