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
 Origin Forum
 Graph Templates

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
cjfraz Posted - 11/13/2006 : 9:33:08 PM
Two questions:

1 – once I’ve created a custom graph template and saved it as an OTP file, what is the easiest and most efficient way (in O75Pro) to create a toolbar button that will automatically plot *highlighted data in the active worksheet* to this template?

2 – How can I rearrange the order of the categories in the main ‘Template Library’? I don’t really want to delete all the entries in there, but I’d like to have ‘My Templates right at the top.

Thanks very much for any advice.

J…
3   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 11/14/2006 : 08:44:26 AM
Two or more layers complicates the script considerably. (Plot button on the Template Library dialog does not use worksheet -p.) This might work for a 2-layer graph (2 Y-columns selected)...

nn=0; %P=""; %Q="";
loop(i,1,wks.ncols) {
if(wks.IsColSel(i) && wks.col$(i).type==1) {
if( nn ) {%Q=%(%H,i); break};
else {%P=%(%H,i); nn=1};
};
};
win -t P TemplateName;
layer -s 1;
layer -iPlotID %P;
layer -s 2;
layer -iPlotID %Q;

Mike Buess
Origin WebRing Member
cjfraz Posted - 11/14/2006 : 12:14:21 AM
Hi Mike,

Solution 2 works like a charm. Thank you.

As for solution 1… that seems to work fine as long as the template has only one layer, however, it does not work so well with more complicated templates.

Any idea how to do this if the template has two or more layers?

Imagine for example that the active worksheet has X2-Y2-Y2 selected, and the intent is to click a button and plot each selected curve into its own layer in a specific template?

I thought (hoped) there might be a way to do this with minimal coding because the same template that fails the worksheet –p command works ok if you just select the data on the worksheet, and plot to the template via the ‘My Templates’ category in the template library.

Thanks,

J…


Edited by - cjfraz on 11/14/2006 12:15:57 AM
Mike Buess Posted - 11/13/2006 : 10:53:18 PM
1. The button should run the following LabTalk script...

worksheet -p plotID TemplateName;
Legend; // create legend

See the -p option of the Worksheet command for a list of plotID's... plotID=200 (line), 201 (symbol), 202 (line+symbol), etc. See Help > Origin > Setting Your Preferences > Customizing Toolbars for instructions on creating toolbars.

2. Template Library settings are saved in Template.ini on your User path. Move your template category (e.g., 8=My Templates) to the top of the Categories list but after the count=8 key. No need to renumber the categories.

Mike Buess
Origin WebRing Member

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