help-octave
[Top][All Lists]
Advanced

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

Re: Differences between graphics_toolkits, greek letters


From: Ben Abbott
Subject: Re: Differences between graphics_toolkits, greek letters
Date: Wed, 18 Jan 2012 11:09:06 -0500

On Jan 18, 2012, at 10:03 AM, Walter White wrote:

> Hello,
> 
> I have some questions about the different graphics toolkits available in 
> Octave
> and hope that you can help me as I could not find any documentation on this 
> topic.
> (Octave 3.4.3, Windows 7)
> 
> Which toolkit is recommended to date? Where are the main differences?
> Is the support for gnuplot being dropped in the future?
> 
> Which toolkit provides more possibilities, in my case primary related to 
> printing figures to
> files, but also other common possibilities?
> 
> I ran the script attached below to examine the labelling of plots by gnuplot 
> and fltk
> and fltk does not print any greek letters. Is it possible?
> 
> Gnuplot does not support greek letters in the legend, do you know a
> way to achieve this?
> 
> Kind regards,
> Walter
> 
> -----------------------------------
> x = 1:10
> y = rand(10,1)
> 
> label_string = '\eta_{efficiency} \epsilon^{2} \lambda \lambda \circ \alpha'
> 
> graphics_toolkit('gnuplot')
> legend = sprintf('r-;%s;',label_string);
> plot(x,y,legend)
> 
> ylabel(label_string)
> xlabel(label_string)
> title(label_string)
> print_filename = sprintf('./test_gnuplot.png')
> print(print_filename, '-dpng','-FHelvetica:8','-S1024,768')
> close all
> 
> graphics_toolkit('fltk')
> 
> legend = sprintf('r-;%s;',label_string);
> plot(x,y,legend)
> 
> ylabel(label_string)
> xlabel(label_string)
> title(label_string)
> print_filename = sprintf('./test_fltk.png')
> print(print_filename, '-dpng','-FHelvetica:8','-S1024,768')
> close all

The gnuplot toolkit is still the default.

The "\circ" command is not supported by Octave. I use \circ in LaTeX quite 
often, but is \circ a valid "TeX" command ?

In any event, using the gnuplot toolkit with Octave-3.4.0 and with the current 
developers sources, the following works for me.

        x = 1:10
        y = rand(10,1)
        label_string = '\eta_{efficiency} \epsilon^{2} \lambda \lambda \alpha'
        plot (x, y)
        legend (label_string)
        ylabel(label_string)
        xlabel(label_string)
        title(label_string)

Something is wrong with the implementation for the syntax below.

        plot (x, y, sprintf (";%s;", label_string))

A bug report needs to be filed. But that will have to wait until after the 
blackout.

        https://savannah.gnu.org/bugs/?func=additem&group=octave

Ben




reply via email to

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