Having hard time making Image Plots?

I would like to create a plot with XY data, and the Z values represented by the colours of the pixels. I'm having a hard time loading my data in the proper fashion, maybe somebody could give me a few pointers?
I've been loading the waves and trying to make a matrix out of them by going data->load waves->load waves and then pressing load column into matrix, and loading the waves from a file. The files contain what would be the Y and Z data values, each file corresponding to a particular X value.
This is where I think I must be doing something wrong, I'm not sure how to get the data into the right form so it can be loaded onto the image plot... also how to label each set of values with the corresponding X value..? (the files are I-V curves, each with a different slope corresponding to the gate voltage - constant during the sweep - for that sweep. I would like to have Vbias as Y, Vgate as X, and I as Z)

Thanks in advance for any help
You need to create a wave that contains the X values, one per file.

Then type this into your Procedure window:

#include <XYZToMatrix>

From the Macros menu, choose XYZToMatrix (later Igors have a recommended XYGridandZtoMatrix),select the X, Y, and Z waves, make other suitable selections, and click Continue.

The macros use either ContourZ or ImageInterpolate voroni to construct the matrix from the X, Y, and Z values.

This is useful when you have limited resolution in one direction, such as a small number of X values, or X values that don't define regular values.

Otherwise, you can just define a matrix and assign the corresponding Z values:
Make/O/N=(numXValues, numYValuesPerX) CurrentI
SetScale/I x, minX, maxX, "", currentI // this presumes the X values are regularly spaced
SetScale/I y,minY, maxY, "", currentI // this presumes the Y values are regularly spaced

schematically (this isn't compilable code), you'd then loop over the loaded Y waves and assign them into CurrentI (the Z wave):
Variable i
for(i=0;i<numWaves;i+=1)
    String yWaveName= "yWave"+num2istr(i) // this presumes your waves are named this way, you'll need different code
    WAVE wy=$yWaveName
    CurrentI[i][] = wy[p]
endfor


--Jim Prouty
Software Engineer, WaveMetrics, Inc.
Ok, forgive me, I'm just new with programming (especially in Igor). I've got it now so that my file contains 3 columns, with 100 data points in each, the 1st goes 1 to 10, then 1 to 10, 1 to 10, ten times, the 2nd is the Current which is dependent on the 1st column, and the 3rd column goes something like 1111111111,2222222222,333...etc... for the constant gate for each sweep.
Under the macros menu, I can only choose either compile or auto-compile..?
I tried to do what you said with making the matrix and all, but I got stuck when it came to the for loop, it didnt like when i put "for", expected wave name.. etc
I managed to get something that looks like what I what, just by creating an array of the proper size ----> Make/N=(101,9) data1, then defining the X and Y ranges, then saying data1=currentwavename. The array fills in order so it looks right since the current wave contains the data for all different columns just back to back, but the X and Y values are not actually connected to the Z, and have nothing to do with the waves..
I would like to just go Windows->New->Image Plot, and pick my X, Y, and Z values so as to have 1 to 10 on the X/Y axes, and the current as the colour, but my 3 waves only appear as choices for the X and Y waves, and theres nothing to choose for Z. I know I need to make a matrix with vbias as Y, vgate as X, and the current as all the matrix elements which make up the Z, but Im not sure how to do this..
Is there an easy way to make a matrix like this just from my 3 waves on the table?\
Thanks again, sorry for all the writing..
After you type:

#include <XYZToMatrix>

into the Procedure window, click Compile and then the Macros menus will populate.

With the 3 waves you describe, the XYGridandZtoMatrix macro is all you need.

And don't forget to take the Guided Tour to familiarize yourself with how Igor works.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
Aha! It's a pre-built macro then, eh? So much easier, thanks very much. I took the guided tour, but somehow was still confused. Thanks again.