Enable “linestyle” functionality for Gnuplot in Octave?

我的梦境 提交于 2019-12-11 07:21:36

问题


In Octave there is the problem that with fltk and qt greek letters in figures are not printed, only with gnuplot as graphics_toolkit. But then with gnuplot all lines are solid, no dashed lines. I found a page which says that other linestyles can be enabled:

http://wiki.octave.org/Enable_%22linestyle%22_functionality_for_Gnuplot%27s_x11_terminal

I added the lines there to my ~/.Xdefaults and did xrdb -merge .Xdefaults as said there, but no success.

I am running octave 4.0.2 on Ubuntu 16.04.

Any hints?

Thanks

Karl


回答1:


It seems you cannot do it for the time being. But if you're happy for workarounds, your best choice seems to be to create an image of greek text and use that as your title etc.

Here's a way. Go to the codecogs online latex editor and write your greek title using their tool in tedious math mode :p If you copy the link to the resulting image, you can use that straight into imread if you prefer to saving a file (this also makes your code automatic such that it can be used in a script, assuming you have an internet connection.

e.g. I used the following math tex to generate the greek title:

\Pi\acute\alpha\lambda\iota~\sigma\kappa\alpha\tau\acute\alpha~\tau\alpha~\kappa\acute\alpha\nu\alpha\mu\epsilon~\mu\epsilon~\tau\alpha~E\lambda\lambda\eta\nu\iota\kappa\acute\alpha~\rho\epsilon~\mu\alpha\lambda\acute\alpha\kappa\epsilon\varsigma

and then using the link to the resulting image (or saving locally)

>> image  % draw octave logo
>> greektitle = imread('http://latex.codecogs.com/png.latex?%5Cdpi%7B300%7D%20%5Chuge%20%5CPi%5Cacute%5Calpha%5Clambda%5Ciota%7E%5Csigma%5Ckappa%5Calpha%5Ctau%5Cacute%5Calpha%7E%5Ctau%5Calpha%7E%5Ckappa%5Cacute%5Calpha%5Cnu%5Calpha%5Cmu%5Cepsilon%7E%5Cmu%5Cepsilon%7E%5Ctau%5Calpha%7EE%5Clambda%5Clambda%5Ceta%5Cnu%5Ciota%5Ckappa%5Cacute%5Calpha%7E%5Crho%5Cepsilon%7E%5Cmu%5Calpha%5Clambda%5Cacute%5Calpha%5Ckappa%5Cepsilon%5Cvarsigma');
>> greektitle = repmat(greektitle,[1,1,3]); % make rgb so unaffected by colormap
>> axes; imagesc(greektitle); axis equal off; 
>> P=get(gca,'position'); set(gca,'position',[P(1),0.9,P(3),0.1]); % place on top
>> saveas(gcf,'out.png','png')



来源:https://stackoverflow.com/questions/39391935/enable-linestyle-functionality-for-gnuplot-in-octave

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!