[R] plot.window: need finite 'ylim' values
Mike
m|ke9 @end|ng |rom po@teo@n|
Sun Aug 23 16:59:53 CEST 2020
Hi Jim,
on 21.08. you wrote:
> Try this:
>
> plot (chart_Series (sample.xts[,1], subset=subset, TA=ta),
> type="n",ylim=c(minimum,maximum))
>
> where minimum and maximum are the extremes of the plot if there were
> any valid values.
I've set
minimum <- 0
maximum <- 1
The error persists.
But besides that, passing 'type="n"' to plot would only make sense
when called once an I know there are only NAs to plot. Since I want to
generate many charts in a loop I would have to check for plotable data
first to decide if 'type="n"' should be passed.
As a workaround for now I do something similar. I check if the range
to be plotted is completely NA. If so I manipulate one of those
observations (which can only be 0, 1 or NA) to an "illegal" value of
0.5.
Mike
More information about the R-help
mailing list