Julia PyPlot plotting

Another plotting package available is PyPlot. PyPlot is one of the standard Python visualization libraries and is directly accessible from Julia. We can take this small script to produce an interesting visualization:

#Pkg.add("PyPlot") 
using PyPlot 
precipitation = [0,0,0,0,0,0,0,0,0,0,0.12,0.01,0,0,0,0.37,0,0,0,0,0.01,0,0,0,0.01,0.01,0,0.17,0.01,0.11,0.31] 
date = collect(1:31) 
fig = figure(1, figsize=(4, 4)) 
plot(date, precipitation, ".") 
title("Boston Precipitation") 
xlabel("May 2013") 
ylabel("Precipitation") 

The resultant output in Jupyter may look like what's shown in the following screenshot:

Again, we have Julia updating a package before executing our Notebook until, finally, we get the graphic on Precipitation:

It's interesting that Boston has such diverse precipitation—most of the month has none, and then there are a couple of days that have a deluge.

A reminder: Jupyter will attempt to put most of the output into a small scrolling window. Just clicking in the left-hand side of the display will expand the entire contents of the scroll panel.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.137.164