Image Plot Help?
Hart43
Now I'm trying to learn how to use the image plot option, but there's a disconnect between the manual I found and actually implementing it. I'm working with a 200x200 matrix of values, where the "position" along the x and y axis would be the location of the value in the image, while the value itself should provide the z-value for the plot. Importing the data is the easy part, but trying to follow the manual instructions for creating an image plot leads to a non-existant z-wave that I don't see in the window that pops up. Can anyone offer advice on how to fix this, or just tell me if it's flat out impossible with the Igor Pro software?
Howard Rodstein recently posted a code snippet to load Excel data into a 2D matrix suitable for image display: http://www.igorexchange.com/node/5648
If this is not your problem, please give more details: are you loading a wave, or creating it? In either case, how is it being done?
April 30, 2014 at 10:24 am - Permalink
I am working with another program called MCNP to generate radiography data. Basically we place an object between a neutron/photon source and a grid which is used to collect data. Based on the interaction of the source particles with the object, it's "shape" is then projected onto the grid, like taking an x-ray. This radiography data is then imported to excel in the form of a 200x200 matrix (ExcelData.PNG - just an example) and used to create a plot similar to an elevation map, where the color of each pixel relates to the value of a unique cell in the matrix (05Vs05_Flat.PNG). As I've done in the past I usually load the data from the Excel file into Igor Pro by using Data -> Load Waves -> Load Excel File... then defining the desired file name, worksheet, and cells as needed.
Thank you for the link, I'll give Rodstein's try code and see if it works with my data.
April 30, 2014 at 11:14 am - Permalink
April 30, 2014 at 11:24 am - Permalink
Because that is just as inconvenient if not more so than loading the data into Igor Pro... the original data is produced in a text file with unique formatting features that make it difficult to load into other programs. The PNG file is a copy of the Excel plot I had used previously. The whole point of doing this in Igor is that the plotting styles and features look cleaner then most of what Excel can do. I would rather learn how to properly import the numerical data used to generate the image then try to tweak a png file of an excel plot after the fact. If I can get around using excel entirely I'd prefer it but I'm still trying to get a handle on Igor Pro's capabilities.
Thank you for the link. It looks like the image has been flipped 180 degrees across both the x- and y-axis but there is at least a picture now!
April 30, 2014 at 11:37 am - Permalink
After creating a 2D Igor matrix, be careful of the differences between
Display; Appendimage
andNewImage
. The former maintains the x- and y-axis directions. the latter inverts the y-axis direction and puts the x-axis on top. Of course you can manually create any choice of axis directions by setting the individual axis limits; the axes can also be interchanged conveniently by using the MatrixOP transpose operation (^t) on the image matrix (see the MatrixOP help file) or else using the ImageRotate operation.April 30, 2014 at 04:20 pm - Permalink