[R] Colouring a grid segment
darren.hennessy at advitech.com.au
Fri Oct 9 03:42:00 CEST 2009
I have done some more tinkering this morning. It seems it's the first polar
plot that has the unusual size. If I add a third plot the last two grids
match ok. So I added a further kludge to solve my problem, I added a dummy
plot before the two 'real' plots and this works ok:
While it works it's not very elegant. This could use some further
Jim Lemon-2 wrote:
> On 10/08/2009 01:15 PM, darrenh65 wrote:
>> I am attempting to create a polar chart (using plotrix polar.plt) and I
>> to colour a segment of the grid to indicate an area of interest, say from
>> 90-120 degrees, for arguments sake. Is this possible? I can colour the
>> grid by passing the grid.bg parameter through to radial.plot but I cannot
>> find a way to colour a segment.
> Hi Darren,
> You're right, there isn't any way to color just one sector of the
> background in a polar.plot. That's the bad news. The slightly less bad
> news is that I think you can kludge it by calling polar.plot twice with
> par(new=TRUE) between. First do the plot without the sector, noting the
> maximum extent of the grid ("maxlength" in the code). Then plot the
> polygon by calling the function so:
> (you may want more than 40 points) Then plot your real data on top of
> this. I can't test this right now, but will try it out in the next day
> or so.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
View this message in context: http://www.nabble.com/Colouring-a-grid-segment-tp25797407p25814366.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help