Message Boards Message Boards

GROUPS:

Package for Radar Charts

Posted 5 years ago
12889 Views
|
13 Replies
|
35 Total Likes
|
13 Replies

@Diego Zviovich this is absolutely stunning, - both the package and the way you documented here its usage. Thank you for making such an exemplary post. I added it it also to Mathematica AddOns and Know-How groups. Are you the author of the package and owner of the linked GitHub repository? I also think we should take the skeleton markdown code for your wonderful doc-like post and make it available to everyone.

Posted 5 years ago

Hi Vitaly,

Yes, I wrote the package as an exercise for learning to use the Mathematica workbench (very cool) and the Github Site.

Regarding the documentation and installer, I borrowed heavily from @Patrick Scheibe's github repository. so kudos to him for setting up such high standards.

Posted 5 years ago

What a marvelous Christmas present. Thank you very much, Diego!

Kind regards, David

Posted 5 years ago

Thanks David!

This is wonderful, Diego! Thank you very much for sharing (and documenting!) the RadarChart package.

Merry Christmas and Happy Holidays!

RadarChart[{aux = Join[{10}, #, Reverse@#] &@{8, 8, 7, 8, 9, 2, 1, 1},
   Join[{0}, #, Reverse@#] &@{0, 0, 0, 0, 0, 0, 0, 10}}, 
 Filling -> Axis, PlotStyle -> {Green, Brown}, 
 Epilog -> {Red, PointSize[0.02], 
   Point[MapIndexed[
     FromPolarCoordinates@{N@#1, 
        bux = Mod[(First[N@#2] - 1)*2 Pi/Length[aux], 2 Pi] + Pi/2; 
        If[bux > Pi, bux - 2 Pi, bux]} &, 
     Join[aux, 0.7*aux, 0.4*aux]]]}, ChartLegends -> None, 
 AxesLabel -> None]

enter image description here

PS - why is PolarCoordinates limited between -Pi and Pi?

Posted 5 years ago

Feliz Natal Pedro!

Few suggestions:

  • Filling from curve to curve like Filling -> {1 -> {2}}

  • AxesType -> "Star" should not remove circular gridlines

  • Mesh -> All and Joined->False for display by points

Posted 5 years ago

Good points for the improvements, I'll take a look at the code to start adding the requested features.

Posted 5 years ago

Two out of three points addressed:

AxesType -> "Star" no longer removes circular gridlines

Mesh -> All and Joined->False for display by points enabled.

RadarChart[{{2, 2, 4, 1, 3}, {4, 3, 6, 2, 3}, {1, 2, 3, 7., 4}}, 
 ChartLegends -> None, PlotLabel -> "Left", AxesType -> "Star", 
 Filling -> Bottom]

enter image description here

RadarChart[table[[1, 2 ;;]], AxesLabel -> Rest@prop, 
 ChartLegends -> None, AxesType -> "Star", PlotRange -> {0, 50}, 
 PlotLabel -> table[[1, 1]], ImageSize -> Large, Joined -> False, 
 PlotStyle -> {{Red, PointSize[Large]}}, 
 Epilog -> {Dashed, Circle[{0, 0}, 25.5]}]

enter image description here

Very nice, @Diego Zviovich, thank you !

I'd like to share an application built with @Jason Biggs about radar chart of sunrise/sunset times for a year :

Needs["RadarChart`"]

sunRadarChart[city_, year_: Automatic, timezone_: Automatic] :=

 Module[{month, set, rise, yr, tz, f, place},

  place = Interpreter["City"][city];
  f[l_] := N[l[[1]] + l[[2]]/60];
  tz = timezone /. Automatic -> LocalTimeZone[place];
  yr = year /. Automatic -> (First@DateList[]);
  month = DateRange[DateObject[{yr}], DateObject[{yr + 1}], Quantity[1, "Months"]];
  set = f[TimeObject[Sunset[GeoPosition[place], #, TimeZone -> tz]][[1]]] & /@ month;
  rise = f[TimeObject[Sunrise[GeoPosition[place], #, TimeZone -> tz]][[1]]] & /@ month;

  RadarChart[{set, rise}, AxesLabel -> (DateString[#, "MonthRomanNumeral"] & /@ month),
   Filling -> Axis, PlotStyle -> {Green, Red}, ImageSize -> 220,
   AxesLabel -> (DateString[#, "MonthRomanNumeral"] & /@ month),
   PlotLabel -> CommonName@place, ChartLegends -> False]]

ParallelMap[sunRadarChart, 
{"Boston", "Nome, USA", "Rio Gallegos, Argentina", "Cape Town", 
  "Dunedin, New Zealand", "Tokio", "Dubai", "Fargo, USA", "Nairobi"}]

enter image description here

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations !

We are happy to see you at the top of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract