Crash Course in Scientific Computing

V. Plotting

We'll be using the notebook feature. The main shortcuts are:

  • toggle between edit (green) and command (blue) with esc and enter respectively.
  • a and b to insert a cell above and below the current position.
  • d d to delete the current cell
  • z to undo
  • m to transform a cell into markdown (text, documentation, etc.)


using Plots
heatmap(space,c=cgrad([:white, :black]), axis=nothing, legend=:none, aspect_ratio=1, yflip=true)
gosper = @animate for i ∈ 1:1000
           nextgen();
           heatmap(space,c=cgrad([:white, :black]), axis=nothing, legend=:none, aspect_ratio=1, yflip=true)
       end
gif(gosper, fps=25)

Plotting mathematical functions can be done as follows:

plot(sin, x, -π, π)
plot!(x->x, -π, π)

Links