[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #36052] Incorrect font in eps output produced
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #36052] Incorrect font in eps output produced by the gnuplot backend |
Date: |
Sat, 31 Mar 2012 10:40:58 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 |
URL:
<http://savannah.gnu.org/bugs/?36052>
Summary: Incorrect font in eps output produced by the gnuplot
backend
Project: GNU Octave
Submitted by: None
Submitted on: Sat 31 Mar 2012 10:40:56 AM UTC
Category: Plotting with gnuplot
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Inaccurate Result
Status: None
Assigned to: None
Originator Name: Moreno Marzolla
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 3.6.1
Operating System: GNU/Linux
_______________________________________________________
Details:
Consider the following code snipped:
set(gcf,"paperorientation","landscape");
papersize=[5 4] * 0.85;
margin=[0 0];
set(gcf,"papersize",papersize);
set(gcf,"paperposition", [margin papersize-margin*2]);
plot([1:10],[1:10],";Foobar;");
xlabel("Foo");
ylabel("Bar");
title("Foobar plot");
print("plot.eps","-depsc2","-debug");
Using octave 3.2.3 (ubuntu 10.04), the gnuplot backend produces the attached
file plot.eps.correct, which is correct.
The same script with octave 3.6.1 (manually compiled from the tarball
available at octave.org) produces the attached file plot.eps.wrong: note that
the font used for title and axis labels is courier instead of helvetica.
By looking at octave-print-commands.log, I observe that Octave 3.2.3 outputs
something like:
set title "Foobar plot" font ",12" enhanced;
set xlabel "Foo" textcolor rgb "#000000" font ",12" enhanced rotate by
0.000000;
unset x2label;
set ylabel "Bar" textcolor rgb "#000000" font ",12" enhanced rotate by
90.000000;
wihle Octave 3.6.1 outputs something like:
set title "Foobar plot" font "{},20" enhanced;
set xlabel "Foo" textcolor rgb "#000000" font "{},20" enhanced rotate by
0.000000;
unset x2label;
set ylabel "Bar" textcolor rgb "#000000" font "{},20" enhanced rotate by
90.000000;
I believe that the problem lies in the font specification
font "{},20"
To fix the wrong font name, the following workaround may work (it seems to
work in this specific case, I am not claiming it is the correct fix to this
problem): in scripts/plot/private/__go_draw_axes__.m, around line 2231,
replace
function [f, s, fnt, it, bld] = get_fontname_and_size (t)
if (isempty (t.fontname) || strcmp (t.fontname, "*"))
fnt = "{}";
else
fnt = t.fontname;
endif
with
function [f, s, fnt, it, bld] = get_fontname_and_size (t)
if (isempty (t.fontname) || strcmp (t.fontname, "*"))
fnt = "";
else
fnt = t.fontname;
endif
Using the patch above, Octave 3.6.1 produces the attached file
plot.eps.better, which looks better.
The font is a bit large, but this is not a bug (I actually prefer larger fonts
since labels are more readable using the default plot size). The font can be
manually reduced using:
print("plot.eps","-depsc2","-F:6","-debug");
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sat 31 Mar 2012 10:40:56 AM UTC Name: plot.eps.correct Size: 22kB
By: None
<http://savannah.gnu.org/bugs/download.php?file_id=25527>
-------------------------------------------------------
Date: Sat 31 Mar 2012 10:40:56 AM UTC Name: plot.eps.wrong Size: 22kB By:
None
<http://savannah.gnu.org/bugs/download.php?file_id=25528>
-------------------------------------------------------
Date: Sat 31 Mar 2012 10:40:56 AM UTC Name: plot.eps.better Size: 22kB By:
None
<http://savannah.gnu.org/bugs/download.php?file_id=25529>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36052>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #36052] Incorrect font in eps output produced by the gnuplot backend,
anonymous <=