2D colour graph with z size as a colour

Hello, I was wondering if there is a way to plot 2D colour graph with z size as a colour using IGOR? I attached an example of such graph (unfortunately I am not sure what program was used to make such plot). Thanks in advance.
We call this "color as f(z)", meaning that the color of trace markers is set as a function of some third quantity z (as opposed to x and y). Read about it by copying this command, pasting it into Igor's command line and pressing Enter:

DisplayHelpTopic "Setting Trace Properties from an Auxiliary (Z) Wave"

You can set trace color in a variety of ways, set the marker size and marker number (choosing which marker to use on a point-by-point basis).

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Thank you very much John! Is there anyway to select custom colours for the f (z) function? regards, Ivan
ivanosu wrote:
Thank you very much John! Is there anyway to select custom colours for the f (z) function? regards, Ivan

When you bring up the f(z) dialog, you may notice that there is a menu labelled Color Mode, with three choices. One of the choices is Three-column Color Wave. Using that choice, you can choose any arbitrary color for each point on a trace. You must make a three-column wave first; the three columns represent red, green and blue components of color, where 0 is no intensity and full intensity is 65535.

An easy way to make and choose/edit a color wave is using the Color Wave Editor package. Go to the Data menu and select Packages->Color Wave Editor. This package creates a panel that makes it possible to choose colors for a three-column wave (or three columns out of an N-column wave) using a color menu instead of having to edit obscure numbers.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Hi all,

Is there any way that you can set the first and last colours in a wave, as you do with the  ModifyImage ctab={first,last,ctab,reverse} command? Or is there a simple way to do this by editing the ctab 3 column wave? The reason I ask is that for my X-ray diffraction patterns, when I execute ModifyImage log=1 the image just shows as black (even for colour tables with no black in them), is this because there are pixels with z=0 and log(0) = -inf? I can't quite see why the whole image shows as black though... But normally I overcome this by setting the first colour at >0. When making my own colour table (even using the package and duplicating another table) I can't get the image to look anything other than completely black. Incidentally, doing ModifyImage log=0 and setting ColourWave = log(p) still doesn't fix the problem.

Any thoughts would be welcome.
Thomas.Dane wrote:
Is there any way that you can set the first and last colours in a wave, as you do with the  ModifyImage ctab={first,last,ctab,reverse} command? Or is there a simple way to do this by editing the ctab 3 column wave?

Use the dialogs to generate commands for you whenever feasible; it's a time-saver:
ModifyGraph zColor(wave0)={zwave,-1,1,BlueHot,0}
ModifyGraph zColorMax(wave0)=(0,0,65535)  // red for values greater than the zMax (1 in this example)
ModifyGraph zColorMin(wave0)=(65535,0,0) // blue for values less than the zMin (-1 in this example)


Thomas.Dane wrote:

The reason I ask is that for my X-ray diffraction patterns, when I execute ModifyImage log=1 the image just shows as black (even for colour tables with no black in them), is this because there are pixels with z=0 and log(0) = -inf? I can't quite see why the whole image shows as black though... But normally I overcome this by setting the first colour at >0. When making my own colour table (even using the package and duplicating another table) I can't get the image to look anything other than completely black. Incidentally, doing ModifyImage log=0 and setting ColourWave = log(p) still doesn't fix the problem.


This thread is about scatter plot color as a function of z (zwave). Now you're talking about image plots, which are slightly different and use a different syntax.

Also, consider what you're asking Igor to do with the color table and data range; you're asking Igor to spread the colors in log ratios over a range of -infinity to some number. Infinity is a lot; all of the colors are effectively assigned to -infinity, leaving only one color for the other values.

Try setting the color minimum to a positive value (where the log isn't -infinity). Here's my example:

make/O/N=(20,20) twod= gnoise(10)    // has negative and positive values
newimage twod
ModifyImage twod minRGB=(63232,0,63232) // pink for values < 0.001
ModifyImage twod ctab= {0.001,29.4246978759766,Grays,0} // here's the setting of 0.001 minimum
ModifyImage twod log=1


Of course, now that I look at it, the documentation for ModifyImage log=1 states that the data must be > 0 to display correctly, so it may just be an accident that the above appears to work.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
Dear all,

I was wondering if there is a way to offset the data on the Igor’s 2D colour plot. The problem is that depending on the data arrangment (highest point on the top of the column or vice versa) Igor would give a totally different graph. I have about 500 points and 60-70% of these points are overlapped. (fig1) I have tried the opaque function and it does not work at all. Could you suggest how to get around this problem? Attached is an example (fig 2) of the graph I want to make where the overlapping point are clearly visible. Unfortunately, I am not sure what program was used to plot such a nice figure.
Thank you in advance.

Ivan

fig 1.jpg fig 2.jpg