LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-09-2019, 04:51 AM   #1
tfonz
LQ Newbie
 
Registered: May 2011
Location: Berlin, Germany
Posts: 9

Rep: Reputation: 14
gnuplot font issue


Using slackware-current, for quite some time now, gnuplot fails to display certain special characters.

Example: Run gnuplot, enter "plot [x=1:10**7] x".

I attached a screenshot showing the issue. When exporting a PDF (using terminal pdfcairo), everything looks OK (labels are 1x10^6, 2x10^6, etc...)
Attached Thumbnails
Click image for larger version

Name:	gnuplot.jpg
Views:	26
Size:	24.0 KB
ID:	31077  
 
Old 08-09-2019, 05:30 AM   #2
Labinnah
Member
 
Registered: May 2014
Location: Łódź, Poland
Distribution: Slackware-current
Posts: 126

Rep: Reputation: 71
This is rather encoding not font problem.
Using i.e. after executing "set encoding iso_8859_1" your command draws × as it should. I suspect some bug in encoding conversion between internal representation and encoding needed by fonts.
 
Old 08-09-2019, 06:40 AM   #3
tfonz
LQ Newbie
 
Registered: May 2011
Location: Berlin, Germany
Posts: 9

Original Poster
Rep: Reputation: 14
Indeed, using "set encoding default" or "set encoding iso_8859_1" helps.

Starting gnuplot with "LC_CTYPE=C gnuplot" also fixes the "x" character, as it then selectes "default" encoding (see "show encoding" or "show locale" in gnuplot).

What doesn't work is "utf8" encoding, which seems to be derived from LC_CTYPE=en_US.UTF-8.

So is this a bug in gnuplot or in Slackware?
 
Old 08-09-2019, 06:54 AM   #4
Labinnah
Member
 
Registered: May 2014
Location: Łódź, Poland
Distribution: Slackware-current
Posts: 126

Rep: Reputation: 71
IMHO this is a bug in gnuplot x11 terminal.

For me it always expect some old 8bit encoding however other parts of gnuplot sends them utf8. If you experiment with "title" command with non ASCII characters, you see that gnuplot input is sensitive to "set encoding" command but output prints more or less garbage. Setting different font also doesn't helping anything.


PS. I cannot help you more, I've use gnuplot first time 2 hours ago .
 
Old 08-09-2019, 08:00 AM   #5
tfonz
LQ Newbie
 
Registered: May 2011
Location: Berlin, Germany
Posts: 9

Original Poster
Rep: Reputation: 14
I checked on a friend's Arch Linux (same gnuplot version). There, the axis labels are correct, with both "set encoding utf8" and "set encoding default". I can break the labels on Arch with 'set term x11 font "courrier"'. After that, it looks just like my screenshot. So I think Slackware may be missing fonts for the utf8 encoding.

I also noticed that on Arch, gnuplot defaults to the "default" encoding, while it defaults to "utf8" on Slackware. Although LANG=en_US.UTF-8 in both cases.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos 6 - gnuplot issue karanalang Linux - Newbie 1 12-22-2016 10:15 PM
[SOLVED] making a gnuplot 3d graph or gnuplot fence plot Rinndalir Programming 3 10-23-2015 01:10 PM
[SOLVED] gnuplot basic graph problem - noob to gnuplot sudowtf Linux - General 2 04-02-2015 11:00 AM
gnuplot Arial font replace with what? MrUmunhum Linux - Software 4 08-10-2011 06:55 PM
[SOLVED] issue with gnuplot script Simon_6162 Linux - Software 4 07-08-2011 06:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration