Reputation: 909
I want to plot the following line plot and scatter plot side-by-side in Julia. The MWE is given below:
using Plots
x = 1:10;
y = rand(10);
plot(x, y)
scatter(x, y)
But doing it this one shows them one below the other, as seperate plots.
Upvotes: 8
Views: 3238
Reputation: 909
Using layout = (1, 2)
might help!
using Plots
x = 1:10;
y = rand(10);
plot1 = plot(x, y);
plot2 = scatter(x, y);
plot(plot1, plot2, layout = (1, 2), legend = false)
Upvotes: 11