The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Color Mapping with discrete values

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
CRTBT-UBT 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
2   L A T E S T    R E P L I E S    (Newest First)
CRTBT-UBT 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 :-)
greg 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 ).


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000