Smooth contimued contour plot
Hello Igor Wave metrics members,
I want to make filled contour plot for my x,y,z data exported from ANSYS Fluent, which should be catagorized as "Plotting 1D X, Y and Z Waves With Non-Gridded XY Data" according to the part of Image plots in the guidebook.
Both Contour plots and Image plots have been tried. But I could not get a smooth continued filled contour, like what is shown in ANSYS Fluent.
For Contour plots, I first used the New Contour Plot operation and then the package of Fill Between Contours.
For Image plots, I created a matrix of wave according to my data and then used Voronoi interpolation to make the image smoother, but however, the result was similar with that from Contour plots.
Maybe the current plots resulted from my inproper parameter settings...
Here I attached the images plotted as well as my data in excel file.
I would be grateful it you could help me with this issue.
The desired image looks like a highly smoothed version of the images from Igor... try filtering the Igor image matrix with MatrixFilter.
October 20, 2023 at 07:02 am - Permalink
Using Igor 9, I made a contour plot. Then I right-clicked to bring up the Modify Contour Plot dialog. In the dialog, I turned on the Fill Contours checkbox. I also double-clicked the left axis to bring up the Modify Axis dialog. I selected the Range tab and reversed the axis range:
This is what I think of as a "filled contour plot". Is that not what you want?
October 20, 2023 at 09:19 am - Permalink
Another possibility is to convert the data to an image using ImageFromXYZ
Duplicate/O dataMat, countMat
ImageFromXYZ /AS {root:X_x, root:X_y, root:nh3__kmol_m3_}, dataMat, countMat
dataMat /= countMat // Replace cumulative z value with average
NewImage dataMat
MatrixFilter NanZapMedian, dataMat
ModifyImage dataMat ctab= {*,*,Rainbow,1}
You can then use a MatrixFilter to do some Gaussian filtering on the image to make it approach your original example:
October 20, 2023 at 06:08 pm - Permalink
Thank you very much the timely help and suggsestions from you all.
It really helped with my former confusion!
October 22, 2023 at 06:13 am - Permalink