Umlauts (or other 'special' characters) in plots?

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

Umlauts (or other 'special' characters) in plots?

Matthias Brennwald (bwm)
Dear all

Is there a way to print umlauts or other 'special' characters in plots?

For example, the following gives poor results (with Octave 2.9.17 and
gnuplot 4.2 on Ubuntu 7.10.):

--------
octave:1> plot(rand(1,10))
octave:2> xlabel('Kräuter')
octave:3> ylabel('Rüben')
--------

Cheers
Matthias


--
Matthias Brennwald
Project Manager Safety Analysis
Hardstrasse 73
5430 Wettingen
Switzerland
+41 56 437 13 32
_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Umlauts (or other 'special' characters) in plots?

David Bateman-3
Matthias Brennwald wrote:

> Dear all
>
> Is there a way to print umlauts or other 'special' characters in plots?
>
> For example, the following gives poor results (with Octave 2.9.17 and
> gnuplot 4.2 on Ubuntu 7.10.):
>
> --------
> octave:1> plot(rand(1,10))
> octave:2> xlabel('Kräuter')
> octave:3> ylabel('Rüben')
> --------
>
> Cheers
> Matthias
>
>
>  
It will work with 2.9.18 when it comes out. At least on gnuplot
"extended" terminals..

D.


--
David Bateman                                [hidden email]
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax)

The information contained in this communication has been classified as:

[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary

_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Umlauts (or other 'special' characters) in plots?

Thomas Ilnseher-2

Am Mittwoch, den 05.12.2007, 15:40 +0100 schrieb David Bateman:

> Matthias Brennwald wrote:
> > Dear all
> >
> > Is there a way to print umlauts or other 'special' characters in plots?
> >
> > For example, the following gives poor results (with Octave 2.9.17 and
> > gnuplot 4.2 on Ubuntu 7.10.):
> >
> > --------
> > octave:1> plot(rand(1,10))
> > octave:2> xlabel('Kräuter')
> > octave:3> ylabel('Rüben')
> > --------
I tested it, and it seems that gnuplot expectes iso8859-1  strings.
setting the terminal encoding to iso8859-1 (or -15) helped, although
there are funny effects during typing. I think this Quick-and-Dirty
function might help you:

(attached)

Tom

Thomas Ilnseher <[hidden email]>

_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave

myfunc.m (140 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Umlauts (or other 'special' characters) in plots?

Matthias Brennwald (bwm)
In reply to this post by David Bateman-3
David Bateman wrote:

> Matthias Brennwald wrote:
>> Dear all
>>
>> Is there a way to print umlauts or other 'special' characters in plots?
>>
>> For example, the following gives poor results (with Octave 2.9.17 and
>> gnuplot 4.2 on Ubuntu 7.10.):
>>
>> --------
>> octave:1> plot(rand(1,10))
>> octave:2> xlabel('Kräuter')
>> octave:3> ylabel('Rüben')
>> --------
>>
>> Cheers
>> Matthias
>>
>>
>>  
> It will work with 2.9.18 when it comes out. At least on gnuplot
> "extended" terminals..

Is there a way to get it working right now? I would be glad to have it
working this week...
I guess the change has been added to the current version available via
CVS. However, I can't access the CVS repository. The connection always
times out.

Matthias


--
Matthias Brennwald
Project Manager Safety Analysis
Hardstrasse 73
5430 Wettingen
Switzerland
+41 56 437 13 32
_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Umlauts (or other 'special' characters) in plots?

Thomas Ilnseher-2
In reply to this post by Matthias Brennwald (bwm)

Am Mittwoch, den 05.12.2007, 20:34 +0100 schrieb Matthias Brennwald:
> Hallo Thomas
>
> Danke für die Hilfe -- nur kann ich mit dem Attachment nichts  
> anfangen. Ich vermute, das Attachment wurde auf dem Weg durch die  
> Mailingliste etwas vermurkst. Kannst du es mir nochmals direkt schicken?
>
> Vielen Dank
> Matthias

Nein, Ich bin ein Depp! falsches Attachment. Das ist das richtige:

Wenn das immer noch nicht geht, alternativ kannst du auch versuchen, das
Programm in ein Textfile im ISO8859-1 encoding zu speichern.
>

---- ENGLISH; ----

Stupid /me! I sent the wrong attachment to the list. (my_func.m instead
of my_xlabel.m). This is the correct one.

Please note that

a) it is very Q-A-D,
b) requires the external iconv program.
--
Thomas Ilnseher <[hidden email]>

_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave

my_xlabel.tar.gz (360 bytes) Download Attachment
my_xlabel.m (174 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Umlauts (or other 'special' characters) in plots?

Fredrik Lingvall
In reply to this post by Matthias Brennwald (bwm)
Matthias Brennwald wrote:
>
> I guess the change has been added to the current version available via
> CVS. However, I can't access the CVS repository. The connection always
> times out.
Perhaps,

export CVS_RSH=ssh

will doit?

/Fredrik
_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Umlauts (or other 'special' characters) in plots?

youtwistedmymelonman
In reply to this post by Thomas Ilnseher-2

Thomas Ilnseher-2 wrote
 
function my_xlabel(utf8_string)
        [exit iso8859_string]=system(["echo '" utf8_string "'| iconv --from-code=UTF-8 --to-code=ISO-8859-15"], 1);
        xlabel(iso8859_string);
end
Your solution works like a charm in a plot generated from Octave...but when you generate an .eps file

print("fileName","-depsc2")

the special characters don't show up well in the output file (they show up as other symbols or don't show up at all).
My problem is that I need to write some accents in the plots: í, é...
Any idea, suggestion...?
I'm using octave 3.0.2

Greetings.

Manuel.