Author |
Topic |
|
LGFelix
USA
4 Posts |
Posted - 12/05/2002 : 2:26:49 PM
|
Hi: Perhaps this is a uninformed question, but I'd like to find a straightforward way to use templates to define 3D and contour graphs (graphs requiring matrices of data). Through trial and error, I have found out how to do it but I suspect there is a better way. It seems that as long as a matrix window is up, a template cannot be accessed through the Plot menu or through a button. However, I can click File|New, select a template (with appropriate path and name), then click within the area on the graph where data are plotted and select Layer Contents, locate an appropriate matrix of data, highlight that and then click the arrow key to associate that matrix with the plot, click OK and up pops the graph. Well, that seems long way to get there. The rather slim Origin 7 manual doesn't address this issue, and I haven't found any clues in the Origin help file. Is there a simpler way? |
|
Mike Buess
USA
3037 Posts |
Posted - 12/05/2002 : 4:32:59 PM
|
quote: It seems that as long as a matrix window is up, a template cannot be accessed through the Plot menu or through a button.
I don't quite understand what you mean by that. When a matrix window is active there are several 3D and contour graphs available on the Plot menu, all of which use templates. Your matrix is automatically plotted if you use one of them. If you're talking about custom templates, the following command creates a contour plot of the active matrix from a graph template named MyContours.otp ...
wo -P 226 MyContours;
Try it first from the script window, replacing MyContours with the name of your template. (If your template is in a subfolder of the Origin program folder you only need to include the subfolder name in the template path.) If it does what you want you can assign it to a button for convenience. The Custom Routine button is easiest to start out with: open custom.ogs in Notepad and replace what's already under the [Main] section with the command above.
Hope that helps,
BTW, "wo" is an abbreviation for the "worksheet" command which you can find out more about in LabTalk help.
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 12/05/2002 4:40:01 PM |
|
|
LGFelix
USA
4 Posts |
Posted - 12/05/2002 : 10:01:10 PM
|
Thank you for your suggestions. I would indeed like to employ a series of customized templates to create families of standardized plots - both 3D plots and contour plots - from various sets of similar experimental data. From your comments, it looks like a fruitful approach would be to use Labtalk to execute a series of commands to create the sets of graphs I need for each set of data. I gather from the help available in Origin that LabTalk has been superceeded by Origin C. However, as I do not profess competency in C, I'll take the LabTalk path for now. I presume the guide for using LabTalk is the LabTalk Language Reference contained in the Origin Programming Help System.
Larry Felix |
|
|
greg
USA
1378 Posts |
Posted - 12/06/2002 : 09:38:51 AM
|
Most of the Plot options on a Matrix menu use the worksheet -p command which requires a PlotID which is specific to the base type of Template used. I guess that's why we don't have a Template option. Here is a very basic script which adds a Template option to the Matrix menu: menu -m; menu 4; menu; menu -i 18 Template {%M=%H;getfile *.OTP;win -t plot %B%A;layer -i %M;layer -a;};
|
|
|
|
Topic |
|
|
|