[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53737] printing to svg gives error and no plo
From: |
Dan Sebald |
Subject: |
[Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2 |
Date: |
Tue, 24 Apr 2018 15:22:37 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Follow-up Comment #18, bug #53737 (project octave):
It looks like some terminals didn't get a review of their font sizes. Or, it
could be that gnuplot changed the format of font sizes for better consistency
across terminals (I seem to recall that, but that may have been pretty long
ago so it may be fine to just use the current syntax without worrying too much
about gnuplot version--gnuplot's terminal settings never got the syntax
standardization that the language commands did). It looks like currently only
"pslatex" is an odd case of gnuplot not having the "font "<name>,<size>"
syntax.
Please try the attached changeset and let me know if that works. It's all
script code, so
patch -p1 < octave-gnuplot_fontformat_svgfractional_moreterms.patch
should be all that is needed; no recompile. I went through all the terminal
types in Octave to verify no extraneous warning is printed, etc. However, if
you notice any warnings or failed terminal behavior beyond SVG, let me know.
I also saw this note in the __gnuplot_print__.m file:
## FIXME: Why does svg format use round on the fontsize while
## other terminals don't?
I don't know why this restriction other than someone along the way thought
that SVG wouldn't allow fractional font sizes. I can't find a pure definition
of SVG on the Internet, but I do see in the following example someone used a
font size of 1.5em:
https://vanseodesign.com/web-design/svg-text-font-properties/
<text x="430" y="100" font-family="Verdana" font-size="1.5em">SVG</text>
So, perhaps fractional is allowed. With that in mind, I modified the
__gnuplot_print__.m file to allow fractional SVG font size. Reran this
example using font sizes of 10, 10.5 and 11. I imported the output files into
Inkscape, zoomed into the numeral 3 and used the cursor placement to get some
measurements of character height from te cursor position:
octave:4> test_10 = 15.66 - 8.59
test_10 = 7.0700
octave:5> test_10p5 = 19.51 - 12.08
test_10p5 = 7.4300
octave:6> test_11 = 20.57 - 12.77
test_11 = 7.8000
Either SVG does in fact allow fractional font size, or gnuplot lays out the
plot such that it appears as though the font has scaled in size (or both).
So, let's remove the restriction on rounding for SVG. That is also in the
attached patch.
Lastly, I added four more entries to the list of allowable gnuplot terminals
and adjusted documentation accordingly: "canvas", "cgm", "latex", "eepic".
(file #44009)
_______________________________________________________
Additional Item Attachment:
File name: octave-gnuplot_fontformat_svgfractional_moreterms.patch Size:8 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53737>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot, gnuplot dumps core, (continued)
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot, gnuplot dumps core, John W. Eaton, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Mike Miller, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Mike Miller, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Rik, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Mike Miller, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, John W. Eaton, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Rik, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Rik, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Francesco Potortì, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Rik, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2,
Dan Sebald <=
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Dan Sebald, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Rik, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Dan Sebald, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Rik, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Dan Sebald, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Mike Miller, 2018/04/24
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Francesco Potortì, 2018/04/26
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Francesco Potortì, 2018/04/26
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Markus Mützel, 2018/04/26
- [Octave-bug-tracker] [bug #53737] printing to svg gives error and no plot with gnuplot 5.2, Francesco Potortì, 2018/04/26