Hi Franziska,
There is programmatic access for finer control and so these things can be manipulated with Origin C code such as pasted below.
You may also want to review these old forum posts. The code below is mainly taken from those, with some more comments etc.
Note as in remarked in one of the old posts that settings can be saved as theme etc to apply later so not always necessary to program - can program to set and then save theme/template etc.
Easwar
OriginLab
Old posts:
http://www.originlab.com/forum/topic.asp?TOPIC_ID=3843
http://www.originlab.com/forum/topic.asp?TOPIC_ID=4415
void custom_color_map()
{
// Point to active contour data plot
GraphLayer gly = Project.ActiveLayer();
DataPlot dp = gly.DataPlots(-1);
if( !dp ) return;
// Get color map into tree object
Tree tr;
if( !dp.GetColormap(tr) )
return;
// Uncomment next line to dump tree in script window
// to see what is available
//out_tree(tr);
// Get current levels
vector vLevels;
vLevels = tr.Details.Levels.dVals;
// Uncomment next two lines to dump current levels
//for(int i = 0; i < vLevels.GetSize(); i++)
// printf("%d %f\n", i, vLevels[i]);
// Now let us change levels, colors etc
// Following code uses some sample numbers for each
// Modify code as applicable to your data
// Set new min, max
double dMin = -5;
double dMax = 5;
// Change number of levels and values
// In this example we are setting to a nonlinear scale, 2nd order polynomial
int nLevels = 32;
vLevels.SetSize(nLevels);
for(int i = 0; i < nLevels; i++)
{
// Note that level needs to be set as % of (max-min)
vLevels[i] = 100 * (i^2)/(nLevels^2);
// Actual value in dialog/GUI will be:
// uncomment line below to verify
//printf("%f\n", dMin + vLevels[i]*(dMax-dMin)/100);
}
// Write new level info to tree
tr.Min.dVal = dMin;
tr.Max.dVal = dMax;
tr.Details.Levels.dVals = vLevels;
// Now let us set colors for each level, using RGB values
vector<uint> vColors;
vColors.SetSize(nLevels);
// Set colors using some nonlinear function for R, G, B
for(i = 0; i < nLevels; i++)
{
int nRed = 256* i / nLevels; // linear in R
int nGreen = 256 * i^2 / nLevels^2; // power of 2 in G
int nBlue = 128 + 128 * sin(2 * Pi * i / nLevels) ; // sinusoidal in B
vColors[i] = nRed + 256 * nGreen + 65536 * nBlue + OCOLOR_RGB_BITS;
// The above sets colors using direct RGB values
// The offset OCOLOR_RGB_BITS indicates to Origin to interpret as RGB
}
// Write colors to tree
tr.Details.Colors.nVals = vColors;
// Can also set above and below color values, such as:
tr.Details.BelowColor.nVal = 3; // set to 4th color in Origin color list
tr.Details.AboveColor.nVal = 1; // set to 2nd color in Origin color list
// So can use color list index, or RGB as shown previously
// Set new color map properties using upated tree
if( !dp.SetColormap(tr) )
printf("Failed to set color map\n");
}
Edited by - easwar on 01/27/2006 3:29:52 PM