Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #4466
| From | Jörg Buchholz <bookwood4new@freenet.de> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: Greek Characters in GnuPlot EPS output files |
| Date | 2022-04-13 07:48 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <t35o7j$1s6$1@dont-email.me> (permalink) |
| References | <t2moj1$lek$1@gioia.aioe.org> <t30mda$u1j$1@dont-email.me> <t31kiu$1e5r$1@gioia.aioe.org> <t334fv$3rr$1@dont-email.me> <t34b8f$vt9$1@gioia.aioe.org> |
On 12.04.2022 19:01, Martin Brown wrote:
> On 12/04/2022 06:59, Jörg Buchholz wrote:
>> On 11.04.2022 18:21, Martin Brown wrote:
>>> On 11/04/2022 08:46, Jörg Buchholz wrote:
>>>> On 07.04.2022 15:22, Martin Brown wrote:
>>>>> I'm very much a beginner with Gnuplot and although I can get it to do
>>>>> most things now. But I have struggled totally with getting Greek
>>>>> characters alpha, beta, gamma, delta and pi to render.
>>>>>
>>>>> I need to produce Postscript graph output for publication and it
>>>>> has to
>>>>> work with MNRAS manuscript templates. I can examine the EPS output
>>>>> from
>>>>> enhanced mode and see the following plausible encoding in the text but
>>>>> it still renders as ASCII characters when the LaTex processes it.
>>>>>
>>>>> setrgbcolor
>>>>> 3106 1050 M
>>>>> [ /Symbol reencodeCP1252 def
>>>>> [(Symbol) 140.0 0.0 true true 0 (a)]
>>>>> [(Helvetica) 140.0 0.0 true true 0 (=0.5, )]
>>>>> [(Symbol) 140.0 0.0 true true 0 (g)]
>>>>> [(Helvetica) 140.0 0.0 true true 0 (=0.2)]
>>>>> ]
>>>>
>>>> What termina ldo you use for the output?
>>>>
>>>> set label "{/Symbol a b c d e}" at 0.5,0.5
>>>> set term post enhanced
>>>> set out 'ps-test-greek.ps'
>>>> plot sin(x)
>>>> set out
>>>>
>>>> produce a graph with Greek characters as a Postscript-File. You must
>>>> used the enhanced option for this.
>>>
>>> Thanks for your help and the suggested example. I suspect there must be
>>> a font missing somewhere but I don't know where or how to provide it.
>>>
>>> I see exactly the same thing rendered with your example as with mine.
>>>
>>> It renders without any reported errors and I see 5 faint black line
>>> rectangles where the labels should be starting at (0.0, 0.5). I estimate
>>> the line width of the rectangles to be about 1/3 that of the sine curve.
>>> _
>>> |_|
>>
>> Do you have Greek characters in other Software? In a word processing
>> software? What is your OS and what version of gnuplot do you use.
>
> OS Win 7 64bit sp1
> Gnuplot Version 5.4 patchlevel 1
here WIN 10 and gnuplot 5.4 patchlevel 3
But I work before on a WIN 7 Maschine with lot of older versions of
gnuplot. Never had problems with the Greek characters.
>>
>> I agree with you, it sounds like a generally font problem on your
>> machine.
>
> Where does "Symbol.*" or "CP1252.ps" reside on your machine?
This comes with the gnuplot installation:
C:\Program Files\gnuplot\share\PostScript\cp1252.ps
There are a lot of "Symbol.*" files. No one at "C:\Program
Files\gnuplot\...."
>
> I had a poke around in gnuplot\share\postscript and noticed that
> cp1252.ps exists there but it is spelt out in lower case where the
> reference above is in uppercase. So I wonder if there is a Unix dislike
> of MS file systems getting in the way somewhere.
>
> I tried renaming it to CP1252.ps (no joy)
>
> It is only in Gnuplot that Greek stubbornly refuses to appear :(
> And its output renders as if the font didn't exist.
>
>> If your LaTeX can produce Greek characters you can use the the
>> "cairolatex" terminal. Then the labels will generated by LaTeX.
>>
>> Example:
>> set label '{${\alpha \beta \gamma \delta}$}' at 0.5,0.5
>> set term cairolatex eps standalone
>> set out 'greek-eps-latex.tex'
>> plot sin(x)
>> set out
>>
>> Than you get a eps-file without any labels and a tex-file with the
>> labels. If you compile the tex_file (something like "pdflatex
>> greek-eps-latex.tex") you get a pdf-file with the graph and the labels.
>
> Thank you for your help. Yes this works OK.
>
> I had to download package transparent but then it was flawless.
> MiKTex happily turned it into the expected form Greek letters and all.
>
> I suspect now that there is something font related missing from my
> MiKTex 2.9 install. I tried looking in its fonts directory but found a
> maze of confusing little passageways all alike. No CP*.ps files at all.
> Subdirectories
> afm, cmap, end, map, misc, opentype, pfm, source, tfm, type1, vf
Here is a "cp1252.4ht" and a "cp1252.enc" in the "...\MiKTeX\fonts...."
directory.
Did you try the epscairo termianl to get a .eps-File? There you can use
direct unicode code.
set term epscairo enhanced font "cp1252"
set label 1 "\\U+03B1 \\U+03B2 \\U+03B3" at 0.5,0.5
set out 'greek-epscairo.eps'
plot sin(x)
set out
There is alpha, beta and gamma in the label.
Jörg
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
Greek Characters in GnuPlot EPS output files Martin Brown <'''newspam'''@nonad.co.uk> - 2022-04-07 14:22 +0100
Re: Greek Characters in GnuPlot EPS output files Jörg Buchholz <bookwood4new@freenet.de> - 2022-04-11 09:46 +0200
Re: Greek Characters in GnuPlot EPS output files Martin Brown <'''newspam'''@nonad.co.uk> - 2022-04-11 17:21 +0100
Re: Greek Characters in GnuPlot EPS output files Jörg Buchholz <bookwood4new@freenet.de> - 2022-04-12 07:59 +0200
Re: Greek Characters in GnuPlot EPS output files Martin Brown <'''newspam'''@nonad.co.uk> - 2022-04-12 18:01 +0100
Re: Greek Characters in GnuPlot EPS output files Jörg Buchholz <bookwood4new@freenet.de> - 2022-04-13 07:48 +0200
Re: Greek Characters in GnuPlot EPS output files Martin Brown <'''newspam'''@nonad.co.uk> - 2022-04-13 16:57 +0100
Re: Greek Characters in GnuPlot EPS output files Jörg Buchholz <bookwood4new@freenet.de> - 2022-04-14 13:57 +0200
Re: Greek Characters in GnuPlot EPS output files Martin Brown <'''newspam'''@nonad.co.uk> - 2022-04-16 11:47 +0100
Re: Greek Characters in GnuPlot EPS output files Jörg Buchholz <bookwood4new@freenet.de> - 2022-04-19 06:55 +0200
csiph-web