How to use 'Make Trace Different' on command line?
Jinhyung Kim
I don't know how to command 'Make Traces Different' on command window or procedure window.
Make Traces Different is in packages of graph.
Eventually, I want to make a function using 'Make Traces Different'.
Thank you very much.
You don't say *how* you want to "make them different".
I'll guess you want to set the trace colors. In that case just call CommonColorsButtonProc with any string parameter value (it is not used) from your own function:
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
January 21, 2014 at 08:41 am - Permalink
I wise up if i click any package, the corresponding command appear on procedure window.
BUT, I can't find detailed command.
For example, if i click 'Polar Graph' on packages of windows, '#include ' is appear in procedure.
But, I can't find the command of 'Radius Data', 'Angle Data', and 'Append Trace' in Polar graph.
To extend my question, there are so many GUI buttons in packages.
How can I know all the commands of the package ??
Thank you again.
January 21, 2014 at 09:07 am - Permalink
#include opens another procedure file into a window. Use Igor's "Windows/Procedure Windows" submenu to see the package's procedure window(s).
Calling routines in the Polar Graphs package is not simple. If you do, make sure to update Igor to 6.34A first (it has easier-to-program functions you can call).
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
January 21, 2014 at 04:12 pm - Permalink
January 21, 2015 at 04:37 pm - Permalink
if you include KBColorizeTraces:
but it might be better to just use this edited copy of the KBColorizeTraces code for your own use:
String ctabname
String graphName = WinName(0, 1)
if (strlen(graphName) == 0)
return -1
endif
Variable numTraces = ItemsInList(TraceNameList(graphName,";",3))
if (numTraces <= 0)
return -1
endif
Variable denominator= numTraces-1
if( denominator < 1 )
denominator= 1 // avoid divide by zero, use just the first color for 1 trace
endif
ColorTab2Wave $ctabname // creates M_colors
Wave M_colors
Variable numRows= DimSize(M_colors,0)
Variable red, green, blue
Variable i, index
for(i=0; i<numTraces; i+=1)
index = round(i/denominator * (numRows-1)) // spread entire color range over all traces.
ModifyGraph/W=$graphName rgb[i]=(M_colors[index][0], M_colors[index][1], M_colors[index][2])
endfor
return 0
End
which you can call as:
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
January 22, 2015 at 01:19 pm - Permalink