Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rio-scatter to tty should display plot on X11 #40

Closed
ole-tange opened this issue Apr 21, 2015 · 3 comments
Closed

Rio-scatter to tty should display plot on X11 #40

ole-tange opened this issue Apr 21, 2015 · 3 comments

Comments

@ole-tange
Copy link

This will dump a PNG file to the tty:

< iris.csv Rio-scatter sepal_length sepal_width species

You never want that. If the output is not redirected to a file, display it on the screen with R's native displayer.

To see if stdout is a terminal you can use:

if [ -t 1 ] ; then
...
fi

@jeroenjanssens
Copy link
Owner

Thanks Ole, that's a good idea. I would fix this in Rio itself. What do you mean with R's native displayer? Do you know how to invoke it from the command line? So far, I've been using display from ImageMagick because it accepts standard input.

@ole-tange
Copy link
Author

I mean something like this:

R -e 'X11();plot(sin, -pi, 2*pi);Sys.sleep(10)'

One of the nice things is that you can resize the window and have the plot redrawn.

@jeroenjanssens
Copy link
Owner

It's a good idea, but I don't have time to implement this myself. If anyone is still interested, please submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants