Octave legend symbols size differ from plot size

Viewed 69

The size of the symbols on the legend is different from the size on the plot. The symbol used for the decision boundary in the legend has the same linewidth as the plot but the crosses in the legend have a different linewidth than the plotted crosses.

Plot

This is the code I used to generate the plot.

clear;

rand ("seed", 158);

data1x = rand(1,30);
data1y = rand(1,30);

data2x = 1+rand(1,30);
data2y = 1+rand(1,30);

dbx = 0:0.1:1.5;
dby = (-2/1.5).*dbx+2

plot(data1x,data1y,'x','linewidth', 3);
hold on;
plot(data2x,data2y,'x','linewidth', 3);
plot(dbx,dby,'k','linewidth', 2);
legend("Negative", "Positive", "Decision boundry");
legend("location","east");
set(gca,"linewidth", 2, "fontsize", 20);
axis("nolabel");

hold off;


saveas(1,"Diagram2.svg","svg");

Is there a way to fix this so that the linewidth of the symbols in the legend are identical to the ones plotted?

0 Answers
Related