help-octave
[Top][All Lists]
Advanced

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

Re: printing greek characters


From: Clinton Winant
Subject: Re: printing greek characters
Date: Sun, 29 May 2016 14:37:48 -0700

I have made progress after:  sudo apt-get install gnuplot, However the pdf file is losing most of the figure.  The program is

nt=46;theta=linspace(0,2*pi,nt);
nr=21;r=linspace(0,1,nr);
 graphics_toolkit("gnuplot")
 close all
 setenv("GNUTERM", "qt")
 set(0, 'DefaultAxesFontname', 'Times New Roman')
 set(0, 'DefaultTextFontname', 'Times New Roman')
 h=r.*transpose(ones(size(theta)));
circlemesh(r,theta,h);
title('\lambda^2=\sigma^2-m\pi^2')
print("bowl.pdf", "-dpdfcairo", "-FTimes New Roman:18")

The screen image is perfect (see attached), but the pdf (attached as well) misses most of the pic.
Looking at the screenshot, this does not look like gnuplot.  I suppose this is what the setenv command does.
BTW I am really, really grateful.  This will save me hours of work to manually import symbols into each fig.

On Sun, May 29, 2016 at 1:31 PM, Dmitri A. Sergatskov <address@hidden> wrote:


On Sun, May 29, 2016 at 3:15 PM, Clinton Winant <address@hidden> wrote:
Dmitri:  I tried a simple version of what you sent:


>>  plot(t,l)
Unknown or ambiguous terminal name 'qt'

​The idea here is to use cairo-based terminals for both screens and hardcopy
outputs to get a more consistent image. Cairo library: 
( https://en.wikipedia.org/wiki/Cairo_(graphics) )

For screens it would be either "qt" or "wxt" terminals. For file outputs it would be
"pdfcairo", "pngcairo", "epscairo". Octave "officially" does not support "epscairo"
but it is fairly simple to add if one really wants it.   ​

​Your gnuplot does not have "qt" terminal. Perhaps you need to install the package
called gnuplot-qt or something. Or you can us "wxt". In any case you can use any
terminal ("x11" or "win") here -- it is just the screen image will be less WYSIWYG.​


>>  axis([0,1,200,2400]); ylabel('λ (Å)');

The output from print -deps plotgreek.eps is attached.  Can you suggest how I might work around?
Ubuntu 16.04   fresh install of octave 4.0.0


​But this is the most important part. If you use "-deps", gnuplot will be using non-cairo
terminal and will not render your fancy fonts correctly.
Try "print -dpdfcairo plotgreek.pdf" ​

​Dmitri.
--


Attachment: bowl.pdf
Description: Adobe PDF document

Attachment: screenshot.png
Description: PNG image


reply via email to

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