Doing as Mike suggests, the [General] section of my Plot.ogs (in the Origin folder) is like follows:
[General]
////////////////////////////////////////////////////////////////////////
// General Plotting of data for Worksheet or Graph
// Assumes 3 arguments: 1st=Plot Type, 2nd=Template, 3rd=Restore/Exchange Axes
////////////////////////////////////////////////////////////////////////
if (exist(%H)==2)
{
%u=%[%c,"_"]%[%c,>"_"]; // takes wks name followed by dataset name
%j=%[%c,"_"]!page.label$; // gets wks label
if (%[%u]>12) %u=%[%u,1:12];
if(exist(%u)!=0){ // Change it if already exists
for(ii=1;ii>0;ii++) {
%z=%u$(ii); if(exist(%z)!=0) continue;
break; };
%u=%u$(ii); };
worksheet -P %1 %2; // Plot the dataset
page.label$=%j; // sets graph label like worksheet's
window -r %h %u; // Changes the name of the graph
}
if (exist(%H)==3)
{
layer -b x %3; //Restore/Exchange Axes if 0/1 respectively
layer -i%1 %C;
return 0;
}
With this, when I plot a dataset (e.g. A) from a worksheet (e.g. Data1), the graph is named "Data1A". You can easily adapt this script to follow your personal naming conventions.
j.