[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Maintaining legend line breaks in PDF output

From: Andreas Yankopolus
Subject: Maintaining legend line breaks in PDF output
Date: Fri, 5 Aug 2016 16:03:23 -0400

Creating legend entries that span multiple lines is no problem:

x = -10:0.01:10;
g1 = normpdf (x,2,2);
g2 = normpdf (x,-2,1.5);
g3 = g1 .* g2;
g3 = g3 .* (100/sum(g3));

legend("Gaussian PDF 1","Gaussian PDF 2","Product of 1 & 2\n(also Gaussian)")
grid on

But when I create a PDF with:

print -dpdf "~/Desktop/gaussians.pdf”

the line break from the last legend entry gets removed and the resulting test extends outside the box. I’ve attached sample output.

How do I keep the line break in PDF output? I’m running Octave on a Mac installed via MacPorts.

Attachment: gaussians.pdf
Description: Adobe PDF document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]