Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plot not defined with Julia

Tags:

plot

julia

I compiled Julia 0.1 from the source code on my Ubuntu 12.04. It is my first time try with Julia actually.

The compilation got through to the end with no problem but some warnings.

When I try to execute the plot command , here comes the problem,

    julia> plot(x->sin(x^2)/x, -2pi,2pi)
    ERROR: plot not defined

Did the compilation go wrong somewhere or Do I have to install extra package to plot in Julia? Thanks

like image 416
L.J Avatar asked Feb 20 '13 01:02

L.J


People also ask

How do I save a plot as Julia?

Julia – Save Plot as PNG or JPEG To save a plot to local file storage, use the method savefig("filename") or png("filename") .

What is PyPlot in Julia?

The PyPlot module for Julia. This module provides a Julia interface to the Matplotlib plotting library from Python, and specifically to the matplotlib. pyplot module. PyPlot uses the Julia PyCall package to call Matplotlib directly from Julia with little or no overhead (arrays are passed without making a copy).


1 Answers

The web-based graphics are outdated and unmaintained (though there's work in progress to get the next generation of web graphics working). Plotting alternatives include the Winston or Gadfly packages at https://github.com/nolta/Winston.jl and https://github.com/dcjones/Gadfly.jl which you can install simply using the Pkg.add("Winston") (or Pkg.add("Gadfly") commands). For documentation and usage examples please refer to the linked repositories.

like image 188
Keno Fischer Avatar answered Sep 19 '22 11:09

Keno Fischer