Skip to content
Back to formatted view

Raw Message

Message-ID: <20200823145953.GE5734@local>
Date: 2020-08-23T14:59:53Z
From: Mike
Subject: plot.window: need finite 'ylim' values
In-Reply-To: <CA+8X3fUvsqtpQ9E8i-iGzbLr_K+oybRFT9dp3uMD-oRN=y4nPQ@mail.gmail.com>

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