MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Logarithmic ticks in SectorChart

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101997] Re: [mg101983] Logarithmic ticks in SectorChart
  • From: "Scot T. Martin" <smartin at seas.harvard.edu>
  • Date: Sun, 26 Jul 2009 03:53:57 -0400 (EDT)
  • References: <200907250817.EAA29646@smc.vnet.net>

Nick,

I'll paste below the function I use for wind roses. Note that I turned off 
PolarGridLines as PolarGridLines->{Automatic,None}. I then add the circles 
I want using Epilog->. I think you could do the same to get the 
logarithmic scale you want.

[Some of code below is not self-explanatory, i.e., the format of 
"windlist," but this aspect is not germane to your question, I think. If 
do want to know the format of windlist, however, let me know, and I can 
send more information.]

Scot

windrose[winds_]:=

(
windlist=winds;
windswkg["directions"]=Length/@windlist;
windswkg["totalfractions"]=windswkg["directions"]/Total[windswkg["directions"]]//N;
windswkg["speeds - wkg"]=BinCounts[#[[All,2]],{windranges}]&/@windlist;
windswkg["speeds"]=windswkg["speeds - wkg"]/Total/@windswkg["speeds - wkg"]//N;
windswkg["speeds - cumulative"]=Rest[FoldList[Plus,0,#]]&/@windswkg["speeds"];

Show[

Table[
SectorChart[Thread[{1,windswkg["totalfractions"] windswkg["speeds - cumulative"][[All,i]]}],
ChartStyle->Switch[i,1,Red,2,Green,3,Blue,4,Yellow],PolarAxes->True,PolarGridLines->{Automatic,None},
GridLinesStyle->{GrayLevel[0.5],Thin},SectorOrigin->{1Pi/2+Pi/8,-1},
PolarAxesOrigin->{1Pi/2+10Pi/8,.4},
PolarTicks->{{{Pi/8,"N"},{3Pi/8,"NE"},{5Pi/8,"E"},{7Pi/8,"SE"},{9Pi/8,"S"},{11Pi/8,"SW"},{13Pi/8,"W"},{15Pi/8,"NW"}},{0.1,.2,.3}},
BaseStyle->{12,FontFamily->"TimesNewRoman"},ImageSize-> 5 72],
{i,4,1,-1}
],

Epilog->{Thin,GrayLevel[0.5],Circle[{0,0},.1],Circle[{0,0},.2],Circle[{0,0},.3]}
]

)


On Sat, 25 Jul 2009, mediatalk wrote:

> Dear All,
>
> the data in this linear rose-diagram is hard to see. Is there a way to
> make the radial scale (0% to 100%) logarithmic? Also, i need the
> percent symbol after the ticks numbers without the dot.
>
> Thanks in advance, Nick.
>
>
> data = {1, 0, 0, 0, 0, 1, 0, 2, 3.5, 65.9, 4.1, 3.4, 3.4, 2.1, 2.1, 2,
>    2, 1, 2, 1, 2, 0, 0, 0, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 0, 1};
>
> SectorChart[Table[{10, i}, {i, PadRight[data, 36]}],
> PolarAxes -> True,
> PolarTicks -> {Table[{(i + 5) \[Degree], (i) \[Degree]}, {i, 0, 350,
>     10}], Range[0, 100, 20]}, TicksStyle -> Directive[Black, 8],
> SectorOrigin -> {95 \[Degree], -1},
> PolarGridLines -> {Range[0 \[Degree], 360 \[Degree], 10 \[Degree]],
>   Automatic}, PolarAxesOrigin -> {Pi/2, 100},
> ChartStyle ->
>  Directive[EdgeForm[{Thin, White}],
>   FaceForm[{RGBColor[0, .2, .5, .5]}]]]
>
>


  • Prev by Date: Re: Re: Show doesn't work inside Do loop ?
  • Next by Date: Re: Optimize evaluation of symbolic expressions
  • Previous by thread: Logarithmic ticks in SectorChart
  • Next by thread: Re: Logarithmic ticks in SectorChart