You might be looking for something more sophisticated but a very simple
example of this is:
julia> using PyPlot
julia> x = collect(0:0.1:5);
julia> y = 2*x;
julia> y2 = y + 0.2*randn(length(x));
julia> plot(x,y,"b-")
julia> plot(x,y2,"r--")
julia> xlabel("the x-axis")
julia> ylabel("the y-axis")
That will create a single plot with a solid blue line showing y = 2x and a
dashed red line showing y2 = 2x + noise. It's useful to remember that
PyPlot.jl is just a wrapper of the python PyPlot library. My usual
procedure when I'm trying to figure out how to plot something with
PyPlot.jl is to figure out (through a combo of the matplotlib manual and
stack overflow posts) how to do what I want to do in Python and then use
the PyPlot.jl readme to translate into julia.
Patrick
On Friday, May 13, 2016 at 12:28:01 AM UTC-7, Ferran Mazzanti wrote:
>
> Dear all,
>
> I'm sure this is a simple question but can't find out the right
> information (manuals?) for Pyplot interfacing in Julia...
> I want to compare several (similar) figures in the same plot, and some of
> them should be plotted with lines (solid, dashed...) and
> colors, while other should be plotted with different symbols (and colors).
> How could I do that in Julia?
> Does anybody has a simple exemple of this that I can take a look at?
>
> Thanks in advance,
>
> Ferran.
>