image plot with different y basis.
Jinhyung Kim
I have z data depending on y for a certain wavelength.
wavelengths are evenly spaced, However, y is not equal and not evenly spaced.
For example,
wavelength1
y1=1
y2=4
y3=6.214
y4=10.112
.
.
wavelength2
y1=4
y2=7.5
y3=11.8481
y4=14.05
.
.
wavelength3
y1=12.02
y2=16
y3=18.1192
y4=21.8221
.
.
(here, the z values are skipped)
I want to image plot of z distribution with wavelength of bottom axis and y distribution of left axis.
(Due to the data range of y, there are blank part in final image)
I searched the forum and manual but I can't find the right way about this.
Is it possible in Igor pro ?
I'm using 6.37 version.
Thanks in advance.
AppendImage/W=$ActiveWindow RawDataWave vs {XWave, YWave}
, but in your case they are not. The only solution I can see is to interpolate your data into evenly spaced pixels and plot it normally.April 6, 2018 at 12:41 am - Permalink
If you really want to display this data as an image as opposed to a 3D graph, check the documentation for AppendImageFromXYZ.
A.G.
WaveMetrics, Inc.
April 6, 2018 at 03:34 pm - Permalink
As you suggested, I'm trying to use Gizmo path.
I made a short macro code to add triplet waves in gizmo
However, there's a problem
When I execute the below macro, there's an error message
"Unknown object"
ModifyGizmo modifyObject=$("tri"+num2str(k)), property{pathcolortype,3}
the word "property" is highlighted.
How can I fix it?
Thank you.
variable i=0
variable k
string property
do
k=600+2*i
appendtogizmo/d path=$("tri"+num2str(k))
modifyGizmo modifyObject=$("tri"+num2str(k)), property{pathcolortype,3}
i+=1
while(i<=10)
end
April 11, 2018 at 08:35 am - Permalink
property={pathcolortype, 3}
See
April 11, 2018 at 09:11 am - Permalink
After I put the equal sign in that position,
the error message also appear and the equal sign is highlighted.
I attached screenshot.
Thank you
April 11, 2018 at 10:32 am - Permalink
property
is not a string, but part of the ModifyGizmo command syntax. Remove the string definition from your code.April 11, 2018 at 10:41 am - Permalink
but the same error is appear as I attached the screen shot.
Thank you
April 11, 2018 at 10:45 am - Permalink
ModifyGizmo modifyObject=objName, objectType=path, property={propertyName,data}
I missed seeing that you omitted the objectType qualifier in the command.
April 11, 2018 at 10:52 am - Permalink
I attached screen shot.
please advise me.
Thank you.
April 12, 2018 at 04:33 am - Permalink
displayhelptopic "Save"
April 12, 2018 at 04:59 am - Permalink
wave wave0, wave1, wave2 // these are triplet waves for each path constructed before the function is called.
variable ii
for(ii=0;ii<3;ii+=1)
AppendToGizmo/D path = $("wave"+num2str(ii))
ModifyGizmo ModifyObject=$("path"+num2str(ii)),objectType=path,property={ drawTube, 1}
ModifyGizmo ModifyObject=$("path"+num2str(ii)),objectType=path,property={ fixedRadius,0.001*(1+ii)}
endfor
end
In this example, I have varied the path's thicknesses using tube-mode radius. WARNING: this example was tested in Igor Pro 7, and will not work in Igor Pro 6. You will need a different means of distinguishing path appearances. Most importantly, in IP6 each Gizmo command in the function will have to be converted to a string (appropriate for the specific 'ii' value) and then executed using the Execute operation; in a Macro, For-Endfor must change to Do - While. You might be able to use a macro rather than a function if you can figure out how to get the path waves into the macro. I strongly encourage upgrading to IP7 and using a function.
April 12, 2018 at 09:07 am - Permalink
I'm using macro to use ModifyGizmo because the ModifyGizmo is not supported in a function in Igor 6 as you mentioned.
So the function you made is not work in my mac, I'm sorry.
After many trials, I resolved the problem with below code.
Actually, I'm not expert in coding, the code is not well written but it works anyway.
Thank you for kind replies and helping me.
variable i=0
variable k
do
k=600+2*i
appendtogizmo/d path=$("tri"+num2str(k)), name=$("tri"+num2str(k))
ModifyGizmo modifyObject=$("tri"+num2str(k)), property = {pathColortype,3}, property = {pathCtab,rainbow}
ModifyGizmo modifyObject=$("tri"+num2str(k)), property = {InverseCtab,1}
i+=1
while(i<=100)
end
April 13, 2018 at 03:13 am - Permalink