Call Rose Plot from Function, Customize Axes Etc.?
astrostu
More details on the actual problem in case someone has a better idea for the data display or needs/wants the context: I have crater data for about two million craters on the moon, and I want to illustrate ellipticity trends (ellipticity = major/minor axis). The dimensions of the data are: latitude, longitude, diameter from a circle fit, ellipticity, and tilt angle (ellipse major axis angle relative to east-west). The way I think these data could be displayed is to first do a simple binning of the lunar surface, such as 30°x30° bins, such that there would be 72 different plots. Then, within each region, separate the data into diameter ranges, such as 10-20km, 20-40km, 40-80km (crater data tend to follow a power-law in number per diameter). Within each bin, within each diameter range, create a rose plot, where angle is ellipse tilt angle, and speed is ellipticity. In this example, there would be 72 regions of the moon, and 3 plots per region (the three diameter ranges). Hence, 216 rose plots that I'd otherwise need to create and adjust manually and copy and paste into Illustrator and arrange manually.
Still two left: How to customize the polar plot in a function/macro with options that I normally have to set in the Polar Graphs window, and any way to do an automatic layout with multiple rose plots tiled across where I set where they are and how large they are compared to the layout.
December 10, 2017 at 09:25 am - Permalink
Variable pgNum = floor(plotNum / 6) + 1 // 1st page is pg 1
AppendLayoutObject/W=summaryLayout/PAGE=(pgnum) graph $plotName
Function TileLayout(nFiles,plotNum)
Variable nFiles,plotNum
Variable pgMax = floor((nFiles -1) / plotNum) + 1
Variable i
DoWindow /F summaryLayout
for(i = 1; i < pgMax + 1; i += 1)
LayoutPageAction/W=summaryLayout page=(i)
Execute /Q "Tile"
endfor
SavePICT/PGR=(1,-1)/E=-2 as "summary.pdf"
End
December 10, 2017 at 10:32 am - Permalink
root:Packages:WMPolarGraphs:PolarGraph0:majorAngleInc = 30
root:Packages:WMPolarGraphs:PolarGraph0:doMinorAngleTicks = 0
root:Packages:WMPolarGraphs:PolarGraph0:angleApproxTicks = 5
root:Packages:WMPolarGraphs:PolarGraph0:tickLabelOpaque = 0
root:Packages:WMPolarGraphs:PolarGraph0:doRadiusRange = "manual"
root:Packages:WMPolarGraphs:PolarGraph0:InnerRadius = 0
root:Packages:WMPolarGraphs:PolarGraph0:OuterRadius = 12
root:Packages:WMPolarGraphs:PolarGraph0:majorRadiusInc = 3
root:Packages:WMPolarGraphs:PolarGraph0:doMajorRadiusTicks = "manual"
root:Packages:WMPolarGraphs:PolarGraph0:radiusTicksLocation = "Inside"
root:Packages:WMPolarGraphs:PolarGraph0:angleTicksLocation = "Inside"
root:Packages:WMPolarGraphs:PolarGraph0:radiusAxesWhere = "0"
WMPolarUpdateButtonProc("PolarGraph0")
WMPolarSetAngleDirection("PolarGraph0", "CCW");WMPolarSetZeroAngleWhere("PolarGraph0","right");WMPolarSetAngleRange("PolarGraph0", 0, 180)
I also have my own WM_GetDistinctColor to set the colors and I created a "Tweaker" macro which sets the legend, line styles, font size, and size of the graph.
Now working on sjr15's suggestions for layout.
December 12, 2017 at 01:22 pm - Permalink
December 12, 2017 at 10:23 pm - Permalink
December 12, 2017 at 11:15 pm - Permalink
https://www.wavemetrics.com/products/igorpro/gallery/user.htm
We could adapt your posting to provide the description, or maybe you'd like to send one to support@wavemetrics.com. We'll credit you and your research if you provide details.
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
December 13, 2017 at 10:13 am - Permalink
Thanks for your interest, Jim. I'm still working on this and would want to send you a more final version. This is also going in a research paper for peer-review, and the reviewer(s) may request changes. If I send it to you in the near future, would you be able to post a revision IF it needs to be revised?
December 14, 2017 at 12:27 pm - Permalink
We're always available to update gallery submissions; send and re-send it when you're comfortable doing so.
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
December 14, 2017 at 06:58 pm - Permalink