Issues using graph macros with polar graph

Hi all,

I am attempting to make a polar graph for something I am working on; however, every time I attempt to reopen a closed graph macro I am receiving an error with my ModifyGraph command. I checked on 'explain error' button, and it has something to do with the axes on my polar graph, but I'm not sure how to resolve my problem (even though I don't think the error is anything major).

With much appreciation,

Stephen


Could you post the code for the macro or a minimal working example that reproduces the error?
It looks like something is undefined, but hard to tell from the image.
HJ
Hi HJ,

I've attached a sample source code for my plot, as well as what I expect the plot to look like.

Again, when I closed the window with my updated figured I received the same error message as before when I attempted to reopen it.

With much appreciation,

Stephen



sample_igor_polar_plot.png (59.3 KB) polar_graph_sourcecode.txt (950 bytes)
No trace is appended in your macro -> no data -> no axis.
The axis are not defined -> the error.
(I tried with a dummy wave and 'bottom' & 'left' as axis, it works; without it doesn't)

There is are a couple of SetDrawEnv save commands that are unnecessary -- but this should not cause errors.

How was this macro created?
HJ
I started with a window -> new -> polar graph. From there, I appended the traces I need and created the figured as desired (changed around the axis properties and such). The data does exist and is loaded into waves that are plotted; the issue is that the waves aren't being remembered when I save the macro.

Not sure why all of the SetDrawEnv save commands are in my procedure window. The reason could be that I clicked the Update Polar Graph Button a few times?

Stephen

I assume the macro was saved using the 'Windows Control' dialogue's 'Save Macro' function.

I tested it with a dummy wave
 make test=x
and got this macro using no grid / axis
Window PolarGraph0() : Graph
    PauseUpdate; Silent 1       // building window...
    String fldrSav0= GetDataFolder(1)
    SetDataFolder root:Packages:WMPolarGraphs:PolarGraph0:
    Display /W=(9.75,44.75,340.5,344.75)/L=VertCrossing/B=HorizCrossing polarY0 vs polarX0
    AppendToGraph/L=VertCrossing/B=HorizCrossing polarAutoscaleTrace vs polarAutoscaleTraceX   // <--------------- This line seem to be missing in your example
    SetDataFolder fldrSav0
    ModifyGraph width={Plan,1,HorizCrossing,VertCrossing}
    ModifyGraph mode(polarAutoscaleTrace)=2
    ModifyGraph lSize(polarAutoscaleTrace)=0
    ModifyGraph noLabel=2
    ModifyGraph axThick=0
    ModifyGraph freePos(VertCrossing)={inf,HorizCrossing}
    ModifyGraph freePos(HorizCrossing)={inf,VertCrossing}
    Label VertCrossing "\\u#2"
    Label HorizCrossing "\\u#2"
    TextBox/C/N=polarGraphSettings/V=0 "PolarGraph0"
    SetWindow kwTopWin,hook=WMPolarGraphHook,hookevents=1
EndMacro


Try to replicate the error in a new experiment with minimal effort and see which step causes it.
Maybe the author from the Polar Graph Package has an idea which does not require testing.
HJ
vicchio wrote:
I started with a window -> new -> polar graph. From there, I appended the traces I need and created the figured as desired (changed around the axis properties and such). The data does exist and is loaded into waves that are plotted; the issue is that the waves aren't being remembered when I save the macro.

Not sure why all of the SetDrawEnv save commands are in my procedure window. The reason could be that I clicked the Update Polar Graph Button a few times?

Stephen


Instead of adding your traces with Append Traces, why not use the Polar Graph panel's append polar data feature?

If your data isn't polar, you could either convert it using r2polar, or append dummy set of data whose trace you hide so you can append your own data, but that's swimming against the tide.

What is your goal?

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
Sorry I haven't checked back on this message thread! I have spent the last week working on another project that didn’t require me to utilize Igor. I appreciate the feedback!

I’ve been trying to use the Polar Graph panel’s append polar data feature, but any macro I create using it fails to open. I’ve looked at the comments, and I’m still not sure how to proceed. My data is already in polar coordinates so I do not have to worry about that at all.

My goal is to create a macro so that I can utilize it for my research. I have a series of other marcos that I consistently use that create really nice figures very easily; however, currently I'm stuck on the polar graph macro.

vicchio wrote:
https://www.wavemetrics.com/products/igorpro/programming/packages.htm

I've been using the above link for creating my polar graphs/macros, which aren't able to be reopened once closed.

Please send in an experiment that demonstrates the problem to support@wavemetrics.com.

If you are using Igor 7, send the email using Igor's Help->Contact Support... menu item.

If you are using Igor 6, please include which exact version of Igor you are using and the operating system (Windows 8/10, Mac OS X 10.whatever).

In your email, explain how you create the polar graphs, and what you do before and after closing the polar graph window so that we can figure out what's going wrong.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
vicchio helped us uncover a bug in Igor 7.0 through 7.02 (now fixed for upcoming 7.03) with the incorrect order of saving a recreation macro and the window kill hook event.

You can work around the problem for now by using Igor's Window->Control->Control dialog (Ctrl+Y) to save a recreation macro before closing the polar graph.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.