octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #65846] multiline title is printed outside ima


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #65846] multiline title is printed outside image when using inner positionconstraint
Date: Sat, 8 Jun 2024 05:15:07 -0400 (EDT)

Follow-up Comment #3, bug #65846 (group octave):

The ratio between the fontsize in printout and onscreen is roughly 1.33 (`get
(0, "screenpixelsperinch")/72`) so first writing the title in a larger
fontsize, changing the positionconstraint and then setting the fontsize back
to the desired printout size should do the job. E.g. :


figure(2)
titlemultiplier = get (0, "defaultaxeslabelfontsizemultiplier");
alpha = get (0, "screenpixelsperinch")/72;
plot(1,1)
ht = title(sprintf('first line\nsecond line'))
set(gca,'labelfontsizemultiplier', alpha*titlemultiplier, ...
    'positionconstraint','innerposition', ...
    'labelfontsizemultiplier', titlemultiplier) 
print('good.png')




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65846>

_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/




reply via email to

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