Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display Images from file in R Jupyter notebook

I have an image on disk and want to display it in a markdown cell in an R Jupyter Notebook. How can I go about this?

I know with Python this as simple as importing the Image class from display.

like image 501
user3617525 Avatar asked Jan 24 '16 21:01

user3617525


2 Answers

IRdisplay has functions to rich display "stuff", which includes images:

library("IRdisplay")
display_png(file="plot.png)  
like image 176
Jan Katins Avatar answered Sep 29 '22 03:09

Jan Katins


In a markdown cell as you usually would in a Jupyter Python notebook:

<img src="../relative/path/to/img.png">

or

![image](../relative/path/to/img.png)
like image 44
saladi Avatar answered Sep 29 '22 03:09

saladi