Author |
Topic  |
|
CRTBT-UBT
France
Posts |
Posted - 01/17/2006 : 12:18:58 PM
|
Origin Version (Select Help-->About Origin): 7.5 Operating System: Win-XP
Hi, I would like to do a simple 2D XY-Scatter-Plot, color each symbol depending on a value stored in a third column and add the corresponding color scale to the plot. These values are discrete values (magnetic field values), so the built-in color-mapping only works with a tedious work-around as it is made for ranges and not for discrete values. Another tedious work around is to copy the data for each magnetic field in a seperate worksheet and then plot them together in one graph. Is there a simple way I oversaw to do it? If yes how? Or are there some scripts/functions which might work?
Thanks for help, Johannes |
|
greg
USA
1379 Posts |
Posted - 01/17/2006 : 4:13:43 PM
|
There probably isn't a simple, satisfactory solution, but here is one possibility:
Your problem is that the Z levels are distributed linearly in 'Z' space whereas you want the Z levels to match your magnetic field values.
In the case where all magnetic field values are unique you can do that by running this script: // BEGIN SCRIPT temp=sort(data1_c); get temp -e end; layer.cmap.numcolors=end; for(ii=1;ii<=end;ii++) { layer.cmap.z$(ii)=temp[ii]; } // END SCRIPT Be sure to change the "data1_c" to match the name of the magnetic field values dataset.
If some of your magnetic field values repeat, you can still use the above script, but repeated values will have different colors and the colormap would not tell you which point is which. You could get around that by removing duplicates from the temp dataset and adjusting the 'end' value before executing the third line of the script ( which I leave as an exercise ).
|
 |
|
CRTBT-UBT
France
Posts |
Posted - 01/18/2006 : 08:22:18 AM
|
Thanks, I will try this... and yes, I have for every field seveeral values, so the execrcise will be necessary :-) |
 |
|
|
Topic  |
|
|
|