Compatibility octave-gnuplot

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Compatibility octave-gnuplot

chelle-2
I'm using octave on UNIX-X11.

Is there a possibility to use the character encoding  ISO-Latin1 in
octave to set (gset) labels or key of a plot. ISO-Latin1 is usefull for
us, european, mainly for accentuated characters.
Gnuplot allows now this kind of encoding with the command  "set encoding
iso_8859_1".

If I do "gset encoding iso_8859_1" in octave, there is no error message,
but I can't write accentuated characters to set the label string.

Is there a solution or is it a future improvement?

Thanks in advance

Michael

--  

      Michael CHELLE  
        INRA                       |  email :
[hidden email]  
   Station de Bioclimatologie      |  phone : +33 1  30 81 55 31
 78850 THIVERVAL-GRIGNON (France)  |  fax   : +33 1  30 81 55 63


Reply | Threaded
Open this post in threaded view
|

Re: Compatibility octave-gnuplot

Friedrich Leisch-3
>>>>> On Thu, 07 Aug 1997 13:25:31 +0100,
>>>>> Michael Chelle wrote:

> I'm using octave on UNIX-X11.
> Is there a possibility to use the character encoding  ISO-Latin1 in
> octave to set (gset) labels or key of a plot. ISO-Latin1 is usefull for
> us, european, mainly for accentuated characters.
> Gnuplot allows now this kind of encoding with the command  "set encoding
> iso_8859_1".

> If I do "gset encoding iso_8859_1" in octave, there is no error message,
> but I can't write accentuated characters to set the label string.

> Is there a solution or is it a future improvement?

iso-latin1 characters work fine for me from within octave ... no
problem setting the main title or the key using german umlaute or
other accented characters.

e.g.:

octave:13> gset title "áéí"
octave:12> gplot x' title "äöü"

do exactly what i expect them to do.

best,
fritz


Reply | Threaded
Open this post in threaded view
|

Re: Compatibility octave-gnuplot

chelle-2
In reply to this post by chelle-2
Guido Notari wrote:
>
> On Thu, Aug 07, 1997 at 01:25:31PM +0100, Michael Chelle wrote:
> > Gnuplot allows now this kind of encoding with the command  "set encoding
> > iso_8859_1".
> Please note that the exact name is ISO-8859-1, with hyphens and not
> underscores.
>

The real name should be ISO-8859-1, but the possible values
of the Gnuplot variable "encoding" are :

Octave<1> gset encoding ISO-8859-1
Octave<2>
gnuplot> set encoding ISO-8859-1
line 0: expecting one of 'default', 'iso_8859_1', 'cp437' or 'cp850'

I think that the problem comes from the core of octave where the
character of the command line should be coded with a char and then
accept the 7bit-ASCII and not the extended 8bit-ASCII, required for
european languages.

Michael
--
      Michael CHELLE  
        INRA                       |  email :
[hidden email]  
   Station de Bioclimatologie      |  phone : +33 1  30 81 55 31
 78850 THIVERVAL-GRIGNON (France)  |  fax   : +33 1  30 81 55 63


Reply | Threaded
Open this post in threaded view
|

Re: Compatibility octave-gnuplot

John W. Eaton-6
On  7-Aug-1997, Michael Chelle <[hidden email]> wrote:

| I think that the problem comes from the core of octave where the
| character of the command line should be coded with a char and then
| accept the 7bit-ASCII and not the extended 8bit-ASCII, required for
| european languages.

I think readline and Octave handle 8 bit characters ok.  I was able to
run Friedrich Leisch's example ok with Octave 2.0.8 (uh, I should
upgrade :-) on a Linux system.

I didn't have to tell gnuplot (3.6 beta) about the encoding.  It just
worked.  However, the characters were displayed as

  \344\366\374

on the terminal (though each \nnn was actually a single character).

As an American, I'm afraid I'm too ignorant to know how to fix that,
and I must also confess that I have no idea how to enter these
characters using my keyboard!  I copied them from the message to a
script file and ran that, then recalled them using the history feature
to force them through readline.

jwe


Reply | Threaded
Open this post in threaded view
|

Re: Compatibility octave-gnuplot

Friedrich Leisch-3
>>>>> On Thu, 07 Aug 1997 18:15:08 +0200,
>>>>> Michael Chelle wrote:

> Thanks for your promising answer. =

> Do you set a special variable to have iso-latin-1 char ?

No, as John (see below) I didn't have to tell octave or gnuplot
anything special about the encoding.

> Which version of Octave do you use ? on which computer ?

Sorry for not including info on OS and octave version .... here we go:

        Octave is version 2.0.8 (i586-pc-linux-gnu)
        Linux is Debian 1.3
        Gnuplot is version 3.5 (pre 3.6) patchlevel beta 328


>>>>> On Fri, 8 Aug 1997 03:18:32 -0500,
>>>>> John W Eaton wrote:

> On  7-Aug-1997, Michael Chelle <[hidden email]> wrote:
> | I think that the problem comes from the core of octave where the
> | character of the command line should be coded with a char and then
> | accept the 7bit-ASCII and not the extended 8bit-ASCII, required for
> | european languages.

> I think readline and Octave handle 8 bit characters ok.  I was able to
> run Friedrich Leisch's example ok with Octave 2.0.8 (uh, I should
> upgrade :-) on a Linux system.

> I didn't have to tell gnuplot (3.6 beta) about the encoding.  It just
> worked.  However, the characters were displayed as

>   \344\366\374

> on the terminal (though each \nnn was actually a single character).

> As an American, I'm afraid I'm too ignorant to know how to fix that,
> and I must also confess that I have no idea how to enter these
> characters using my keyboard!  I copied them from the message to a
> script file and ran that, then recalled them using the history feature
> to force them through readline.

As Austrians we depend on Latin1 characters (German Umlaute), so our
terminals use setup to properly display the characters ... but I think
that has got nothing to do with octave. I can enter special characters
using modifier keys, but again that's a question about keyboard and X
setup, not octave.

Michael: Can you type the Latin1 characters at, let's say, a shell
prompt? In that case you should be able to use them with octave, too.

Best,
Fritz

--
-------------------------------------------------------------------
                        Friedrich  Leisch                            
Institut für Statistik                      Tel: (+43 1) 58801 4541
Technische Universität Wien                 Fax: (+43 1)  504 14 98
Wiedner Hauptstraße 8-10/1071      [hidden email]
A-1040 Wien, Austria             http://www.ci.tuwien.ac.at/~leisch
     PGP public key http://www.ci.tuwien.ac.at/~leisch/pgp.key
-------------------------------------------------------------------


Reply | Threaded
Open this post in threaded view
|

Re: Accentuated character

chelle-2
In reply to this post by John W. Eaton-6
John W. Eaton wrote:

>
> On  8-Aug-1997, Michael Chelle <[hidden email]> wrote:
> | I've also tried  with the Friedrich Leisch's example and the accentuated
> | characters didn't print in the octave's window. May it be a problem of
> | configuration or environment of my xterm (I don't think so , because I
> | can write accentuated characters in a xterm shell window)
> | Any idea ?
>
> How did you type (or cut/paste) the characters at the Octave prompt?
> When I tried to cut and paste with the mouse, they didn't show up at
> all (I suspect a limitation of the X11 code).  But when I moved them
> into a file using Emacs (which is also my mail reader) it worked
> fine.  They came up as accented characters in the gnuplot window.

1) If Octave  read a file with accentuated char,
  it works ie gnuplot shows title with accentuated char in a
X11-window.   If you want to generate the postscript file, you must
"gset encoding iso_8859_1" and choose the enhanced postscript driver.

2) The cuting/pasting  or typing of  accentuated char works between
shell xterm and gnuplot xterm, but doesn't work  here with octave xterm.
Then it seems to be more a limitation of octave than a X11 limitation.

Michael


Reply | Threaded
Open this post in threaded view
|

Re: Accentuated character

Bo Johansson-2
Michael Chelle <[hidden email]> writes:

> 2) The cuting/pasting  or typing of  accentuated char works between
> shell xterm and gnuplot xterm, but doesn't work  here with octave xterm.
> Then it seems to be more a limitation of octave than a X11 limitation.

I have a file in my home directory called .inputrc which contains

set convert-meta off
set meta-flag on
set output-meta on

It's been a while since I set this up but I believe this makes readline
handle 8-bit chars properly.

Regards Bosse


Reply | Threaded
Open this post in threaded view
|

Accentuated character, the explaination

chelle-2
Bo Johansson wrote:

>
> Michael Chelle <[hidden email]> writes:
>
> > 2) The cuting/pasting  or typing of  accentuated char works between
> > shell xterm and gnuplot xterm, but doesn't work  here with octave xterm.
> > Then it seems to be more a limitation of octave than a X11 limitation.
>
> I have a file in my home directory called .inputrc which contains
>
> set convert-meta off
> set meta-flag on
> set output-meta on
>
> It's been a while since I set this up but I believe this makes readline
> handle 8-bit chars properly.

Thanks, that's it.
and you need to "gset encoding iso_8859_1" to generate a good postscript

Many thanks to everybody to help me to understand this.

Michael