Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Jupyter 5 - Second Edition

You're reading from  Learning Jupyter 5 - Second Edition

Product type Book
Published in Aug 2018
Publisher
ISBN-13 9781789137408
Pages 282 pages
Edition 2nd Edition
Languages

Table of Contents (18) Chapters

Title Page
Packt Upsell
Contributors
Preface
1. Introduction to Jupyter 2. Jupyter Python Scripting 3. Jupyter R Scripting 4. Jupyter Julia Scripting 5. Jupyter Java Coding 6. Jupyter JavaScript Coding 7. Jupyter Scala 8. Jupyter and Big Data 9. Interactive Widgets 10. Sharing and Converting Jupyter Notebooks 11. Multiuser Jupyter Notebooks 12. What's Next? 1. Other Books You May Enjoy Index

R visualizations in Jupyter


A common use of R is to use several visualizations, which are available depending on the underlying data. In this section, we will go over some of them to see how R interacts with Jupyter.

R 3D graphics in Jupyter

One of the packages available for 3D graphics is persp. The persp package draws perspective plots over a 2D space.

We can enter a basic persp command in a new Notebook just by using the following command:

example(persp) 

So, we will have something like this in a Notebook:

Once we run the step (Cell | Run All), we will see the display that's shown in the following screenshot. The first part is the script involved in generating the graphic (this is part of the example code):

 

Then, we will see the following graphic display:

R 3D scatterplot in Jupyter

The R lattice package has a Cloud function that will produce 3D scatterplots.

The script we will use is as follows:

# make sure lattice package is installed 
install.packages("lattice") 
 
# in a standalone R script...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}