Issues using graph macros with polar graph
vicchio
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
It looks like something is undefined, but hard to tell from the image.
HJ
April 8, 2017 at 02:20 am - Permalink
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
April 8, 2017 at 08:02 am - Permalink
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
April 8, 2017 at 02:03 pm - Permalink
Not sure why all of the
SetDrawEnv save
commands are in my procedure window. The reason could be that I clicked theUpdate Polar Graph Button
a few times?Stephen
April 9, 2017 at 05:42 pm - Permalink
I tested it with a dummy wave
make test=x
and got this macro using no grid / axis
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
April 10, 2017 at 01:48 am - Permalink
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.
April 10, 2017 at 11:15 am - Permalink
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.
April 25, 2017 at 09:15 am - Permalink
I've been using the above link for creating my polar graphs/macros, which aren't able to be reopened once closed.
April 25, 2017 at 09:26 am - Permalink
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.
April 25, 2017 at 12:00 pm - Permalink
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.
April 26, 2017 at 07:26 pm - Permalink