Message-ID: <DA32DC18-A881-4B56-B8DD-BD8ED28F83DD@gmail.com>
Date: 2020-08-17T18:02:04Z
From: Daniel Cegiełka
Subject: Empty indicator / plot.window: need finite 'ylim' values
In-Reply-To: <CAPPM_gSow3ZipNBXjhFmek+Tp0+wHfAmKH4tL+Erd4=6nGf6iw@mail.gmail.com>
> On 17 Aug 2020, at 19:37, Joshua Ulrich <josh.m.ulrich at gmail.com> wrote:
>
> On Mon, Aug 17, 2020 at 12:33 PM Daniel Cegie?ka
> <daniel.cegielka at gmail.com <mailto:daniel.cegielka at gmail.com>> wrote:
>>
>>
>>
>>> On 17 Aug 2020, at 04:55, Rasmus Liland <jral at posteo.no> wrote:
>>>
>>> Dear Mike,
>>>
>>> if I change this line
>>>
>>> plot (chart_Series (sample.xts[,1], subset=subset, TA=ta))
>>>
>>> to
>>>
>>> plot(chart_Series(sample.xts[subset,1], TA=ta))
>>>
>>> A plot appears. No errors. Was this
>>> what you were looking for?
>>>
>>
>>
>> Guys :)
>>
>> chart_Series() is a plot env/func, so plot(chart_Series()) make no sense :)
>>
> Except that it is necessary to wrap chart_Series() in a call to plot()
> if you call it from within a function, for loop, or any other
> situation where R's auto-printing is disabled.
>
I agree, but in this example earlier it was pointless.
https://github.com/joshuaulrich/quantmod/blob/master/R/replot.R#L202
> c <- quantmod::current.chob()
> str(c)
Classes 'replot', 'environment' <environment: 0x7f9cbdaa8fd8>
So print.replot() will call plot.replot() automatically.
> Cheers,
> Josh
>
>
>>
>> Try:
>>
>> chart_Series(sample.xts[subset,1], TA=ta)
>>
>> ?chart_Series
>>
>> But your problem is here:
>>
>> sample.xts[subset, 2]
>>
>>
>> Best,
>> Daniel
>>
>>
>>
>>
>>> /Rasmus
>>> _______________________________________________
>>> R-SIG-Finance at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>> -- Subscriber-posting only. If you want to post, subscribe first.
>>> -- Also note that this is not the r-help list where general R questions should go.
>>
>> _______________________________________________
>> R-SIG-Finance at r-project.org <mailto:R-SIG-Finance at r-project.org> mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance <https://stat.ethz.ch/mailman/listinfo/r-sig-finance>
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions should go.
>
>
>
> --
> Joshua Ulrich | about.me/joshuaulrich <http://about.me/joshuaulrich>
> FOSS Trading | www.fosstrading.com <http://www.fosstrading.com/>
[[alternative HTML version deleted]]