| T O P I C R E V I E W |
| Voostra |
Posted - 03/31/2005 : 4:59:47 PM So, I've made a template for a contour map / colorplot, and for the most part it works how I'd like it to, except that my levels don't seem to stay the way I want them to: i.e., I set them up to be <0, 1, 2, 4, 7, 11, 16, >22 (or whatever) these are mapped to a greyscal, with luiminosity values set like: 240, 120, 115, 110, 100, 90, 70, 40, 0 and the next time I come in, it's kept the same number of divisions, but made them evenly spaced out (and evenly spaced out the colors), so it's been changed to <0, 4, 7, 10, 13, 16, 19, >22 luminosity 240, 198, 165, 132, 99, 66, 33, 0 (almost, but it illustrates the point)
So, I guess what I'd wondering is if there is a way to specify the z values for the levels explicitly, as well as colors to go with them. Closest I could find was the Get and SetColormap, which only seem to have the capacity to set the number of levels, and not the levels explicitly.
Thanks, Evan |
| 2 L A T E S T R E P L I E S (Newest First) |
| Voostra |
Posted - 04/01/2005 : 11:43:38 AM Perfect, just what I was looking for.
Thanks! |
| rdremov |
Posted - 03/31/2005 : 6:28:17 PM You can use theme instead of template: 1. make a plot you like , assign all contour levels and colors 2. right click on the contour plot and hold shift + click "Save format as theme" 3. in the "Save Format as theme" dialog change the name to meaningful for you e.g. "MyContourTheme". 4. Press OK to close the dialog. Your theme will be saved for later use. Now to use it for another contour graph, simply activate the graph, press F7 to bring up "ThemeEditor" dialog, select "MyContourTheme" and click the "Apply" button to apply selected theme to the currently active plot.
Advanced: 5. You can also change levels and colors in the "Save Format as theme" dialog, just click on ">>" symbol and navigate to "Levels", click on it, then click on the button "..." which should appear at the right end of the "Level" property. This will open small dialog to change the value of every level (values are in % relative to Zmin and Zmax). You can edit colors, line width etc. in the same way. 6. Also, you can set this theme as a system theme, which will apply to any newly created graph.
Even more advanced: every property you see in the theme editor for colormap can be modified via OriginC. See below example to set 2nd level: BOOL ColorMapLevels() { // get active graphic layer GraphLayer gl = Project.ActiveLayer(); if( !gl ) return FALSE; // get active dataplot DataPlot dp = gl.DataPlots(-1); if( !dp ) return FALSE; // get colormap Tree tr; dp.GetColormap(tr); // get levels vector vector vLevels; vLevels = tr.Details.Levels.dVals; // change 2nd level to be 3.5% larger then Zmin, differnce (Zmax - Zmin) is 100% vLevels[1] = 3.5; // set levels vector tr.Details.Levels.dVals = vLevels; // set colormap dp.SetColormap(tr); return TRUE; }
Edited by - rdremov on 03/31/2005 6:41:13 PM |
|
|