Skip to content

unable to fplot with RcppOctave #12

@iembry-USGS

Description

@iembry-USGS

Hi, I am attempting to follow some examples of fplot in GNU Octave with RcppOctave. Although there are errors in GNU Octave, all 3 of the plots are drawn, but none of them are drawn in R.

in R 3.2.4 (there are no plots)

library(RcppOctave)
o_source(text = "
fplot('2*sin(theta)+2', [0 2*pi]); % page 443 Brockman
fplot("[cos(x), sin(x)]", [0 2*pi])
fplot(@cos, [0, 2*pi])
")

In addition, in R, this is the error message that appears:

Error: unexpected string constant in:
" fplot(@cos, [0, 2*pi])
""

in GNU Octave 3.8.1 (although I have the errors, all 3 of the attempted plots are drawn)

octave:1> fplot('2*sin(theta)+2', [0 2*pi]); % page 443 Brockman
error: invalid value = northeast
error: set: invalid value for radio property "location" (value = northeast)
error: called from:
error:   /usr/share/octave/3.8.1/m/plot/appearance/legend.m at line 995, column 11
error:   /usr/share/octave/3.8.1/m/plot/draw/fplot.m at line 176, column 7
octave:1> 
octave:1> fplot("[cos(x), sin(x)]", [0 2*pi])
error: invalid value = northeast
error: set: invalid value for radio property "location" (value = northeast)
error: called from:
error:   /usr/share/octave/3.8.1/m/plot/appearance/legend.m at line 995, column 11
error:   /usr/share/octave/3.8.1/m/plot/draw/fplot.m at line 181, column 7
octave:1> 
octave:1> fplot(@cos, [0, 2*pi])
error: invalid value = northeast
error: set: invalid value for radio property "location" (value = northeast)
error: called from:
error:   /usr/share/octave/3.8.1/m/plot/appearance/legend.m at line 995, column 11
error:   /usr/share/octave/3.8.1/m/plot/draw/fplot.m at line 176, column 7
octave:1> 

Thank you.

Irucka

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions