Degree sign is well displayed when setting utf8 encoding, except for the mouse reading that is displayed at the bottom left corner: there, it always reads °
If you are talking about the x11 terminal, I think it's hopeless. Years ago it was possible to get x11 to display characters from multi-byte encodings by choosing one or more x11 fonts with a non-ascii encoding and telling the terminal driver to use multibyte support. Unfortunately the distros I use seem to have dropped the specifc fonts and x11 settings I used to have working. Probably no one cares about x11 any more because the world has moved on to much fancier GUIs that don't require jumping through hoops to print unicode characters.
For what it's worth, which is probably not much, I used to be able to use:
set term x11 font "mbfont:sazanami mincho,vera,20"
That doesn't work on my linux machines any more, even though I still have the fonts.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
term is set to "unknown" just at the beginning, in order to check out min and max values of y data; eventually it is set to wxt
'01 nov' doesn't show up in the x-axis for a reason that is beyond me, but that's another issue...
reset session
set encoding utf8
set term unknown
set decimalsign locale
set locale "spanish"
unset mxtics
a = 11 # ath COLUMN OF THE FILE
a2= 10 # a2th COLUMN OF THE FILE
c = 1 # PLOT EVERY c POINTS
año = '2022'
v = 12 # N° OF TICS OF X-AXIS
giu = 0.02; su = 0.04 # MARGIN [IN % OF ymax-ymin] ADDED TO THE PLOT ABOVE & BELOW
file = "D:/Giustino/METEO/mingw64/bin/".año."-MaxMin.txt"
set xdata time
set timefmt "%d/%m/%Y"
set format x "%d%b\n%Y"
set mouse mouseformat function strftime("%d%b\n%Y",x).' '.gprintf("%.1f",y).h[a]
yticsformat = "{/:Bold %.1f}"
plot file using (timecolumn(1,"%d/%m/%Y")):a with lp pt 7 lt rgb "dark-spring-green" notitle
replot file using (timecolumn(1,"%d/%m/%Y")):a2 with lp pt 7 lt rgb "dark-magenta" notitle
set xtics format "{/:Bold %d%b}\n%Y" font "Times-New Roman, 12" rotate by 20 offset -1.3,-0.6
set ytics format yticsformat font "Times-New Roman, 12" nomirror
set term wxt background rgb "light-turquoise"
set border 31 lw 3.0
set pointsize 0.3
set title sprintf("{/:Bold %s}",e[a]) font "Times-New Roman, 13" offset 0,-2.5 textcolor "dark-spring-green"
set ylabel sprintf("{/:Bold %s}",h[a]) font "Times-New Roman, 14" offset 3.75,9.8 textcolor "dark-spring-green" rotate by 0
set xrange [GPVAL_DATA_X_MIN - 86400:GPVAL_DATA_X_MAX + 86400]
set xtics GPVAL_DATA_X_MIN,(GPVAL_DATA_X_MAX - GPVAL_DATA_X_MIN)/(v-1),GPVAL_DATA_X_MAX
b = GPVAL_DATA_Y_MAX - GPVAL_DATA_Y_MIN
set yrange [GPVAL_DATA_Y_MIN -bgiu:GPVAL_DATA_Y_MAX +bsu]
set title sprintf("{/:Bold %s}",e[a]) font "Times-New Roman, 13" right textcolor "dark-spring-green"
set label sprintf("{/:Bold %s}",e[a2]) font "Times-New Roman, 13" at graph 0.51,0.957 textcolor "dark-magenta"
rep
Just replace bgiu by b * giu and bsu by b * su (at the end of that same line) ... it looks like the editor replaced the original * by the italica writing of what followed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It thus depend on the terminal and on the O/S (for some reason, your gnuplot plots integer values for y... maybe with set decimalsign ',' above (instead of set decimalsign locale you should get it right; but anyway, that's irrelevant for the mouse reading). Then I guess it is indeed a bug: as you see, the ylabel is well displayed: °C/h; it's only the mouse reading that does not display it well.
Last edit: Justin Sales 2023-04-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
O/S? Terminal type?
If you are talking about the x11 terminal, I think it's hopeless. Years ago it was possible to get x11 to display characters from multi-byte encodings by choosing one or more x11 fonts with a non-ascii encoding and telling the terminal driver to use multibyte support. Unfortunately the distros I use seem to have dropped the specifc fonts and x11 settings I used to have working. Probably no one cares about x11 any more because the world has moved on to much fancier GUIs that don't require jumping through hoops to print unicode characters.
For what it's worth, which is probably not much, I used to be able to use:
That doesn't work on my linux machines any more, even though I still have the fonts.
Cygwin's gnuolot are provied with the X11 multibyte patch.
I do not know that this will fix your issue because I do not use the X11 terminal.
O/S is windows and terminal type, wxt
Please sumit scripts or command and operations to reproduce the phenoma.
term is set to "unknown" just at the beginning, in order to check out min and max values of y data; eventually it is set to wxt
'01 nov' doesn't show up in the x-axis for a reason that is beyond me, but that's another issue...
reset session
set encoding utf8
set term unknown
set decimalsign locale
set locale "spanish"
unset mxtics
a = 11 # ath COLUMN OF THE FILE
a2= 10 # a2th COLUMN OF THE FILE
c = 1 # PLOT EVERY c POINTS
año = '2022'
v = 12 # N° OF TICS OF X-AXIS
giu = 0.02; su = 0.04 # MARGIN [IN % OF ymax-ymin] ADDED TO THE PLOT ABOVE & BELOW
file = "D:/Giustino/METEO/mingw64/bin/".año."-MaxMin.txt"
set xdata time
set timefmt "%d/%m/%Y"
set format x "%d%b\n%Y"
set mouse mouseformat function strftime("%d%b\n%Y",x).' '.gprintf("%.1f",y).h[a]
yticsformat = "{/:Bold %.1f}"
plot file using (timecolumn(1,"%d/%m/%Y")):a with lp pt 7 lt rgb "dark-spring-green" notitle
replot file using (timecolumn(1,"%d/%m/%Y")):a2 with lp pt 7 lt rgb "dark-magenta" notitle
set xtics format "{/:Bold %d%b}\n%Y" font "Times-New Roman, 12" rotate by 20 offset -1.3,-0.6
set ytics format yticsformat font "Times-New Roman, 12" nomirror
array e[12]; array h[12]
h[10]= 'ºC/h'; e[10] = 'Var/h MinT→MaxT (standard time)'
h[11]= 'ºC/h'; e[11] = 'Var/h MaxT→MinT (standard time)'
set term wxt background rgb "light-turquoise"
set border 31 lw 3.0
set pointsize 0.3
set title sprintf("{/:Bold %s}",e[a]) font "Times-New Roman, 13" offset 0,-2.5 textcolor "dark-spring-green"
set ylabel sprintf("{/:Bold %s}",h[a]) font "Times-New Roman, 14" offset 3.75,9.8 textcolor "dark-spring-green" rotate by 0
set xrange [GPVAL_DATA_X_MIN - 86400:GPVAL_DATA_X_MAX + 86400]
set xtics GPVAL_DATA_X_MIN,(GPVAL_DATA_X_MAX - GPVAL_DATA_X_MIN)/(v-1),GPVAL_DATA_X_MAX
b = GPVAL_DATA_Y_MAX - GPVAL_DATA_Y_MIN
set yrange [GPVAL_DATA_Y_MIN -bgiu:GPVAL_DATA_Y_MAX +bsu]
set title sprintf("{/:Bold %s}",e[a]) font "Times-New Roman, 13" right textcolor "dark-spring-green"
set label sprintf("{/:Bold %s}",e[a2]) font "Times-New Roman, 13" at graph 0.51,0.957 textcolor "dark-magenta"
rep
Last edit: Justin Sales 2023-04-02
I could not reproduce because you did not provide 2022-MaxMin.txt.
Please submit it as an attachment.
BTW,
you can check those using "stats" command.
Last edit: Tatsuro MATSUOKA 2023-04-02
I executed your script and got messages.
Last edit: Tatsuro MATSUOKA 2023-04-02
Just replace bgiu by b * giu and bsu by b * su (at the end of that same line) ... it looks like the editor replaced the original * by the italica writing of what followed.
When you describe code, you should better to use code fileld not to use boby text. * has a special meaning on body text.
Screenshot is attached
One of the mouse reading is follows
On cygwin and ubuntu on wxt, the mouse reading is like
On qt
Last edit: Tatsuro MATSUOKA 2023-04-02
It thus depend on the terminal and on the O/S (for some reason, your gnuplot plots integer values for y... maybe with
set decimalsign ','
above (instead ofset decimalsign locale
you should get it right; but anyway, that's irrelevant for the mouse reading). Then I guess it is indeed a bug: as you see, the ylabel is well displayed: °C/h; it's only the mouse reading that does not display it well.Last edit: Justin Sales 2023-04-02
On the windows teminal
Paste of mouse reading
On the qt terminal
Paste of mouse reading
Last edit: Tatsuro MATSUOKA 2023-04-02
Unfortunately qt terminal seems not to have background option.
For details, see https://sourceforge.net/p/gnuplot/mailman/gnuplot-beta/?viewmonth=202304
Last edit: Tatsuro MATSUOKA 2023-04-04