How can I please set wedges in gnuplot in linux? I would like to write for instance ř, š, č, í, á etc. I have Version 5.0
I tried the following commands. Thank you!
set locale "cs_CZ"
Locale not available.
show locale
gnuplot LC_CTYPE cs_CZ.UTF-8
gnuplot encoding default
gnuplot LC_TIME cs_CZ.UTF-8
gnuplot LC_NUMERIC C
Related
I use Gnuplot with pngcairo terminal and my question ison can I put the tilde symbol on a letter?
I know that in latex the command is \tilde{f}.
I've tried with f{\Symbol 304} or f\\~.
How can I do?
Check help enhanced text.
With this:
### tilde over character
set label 1 "~f{0.9\\~}" at screen 0.25, 0.75 font ",20"
plot x
You get the following (wxt terminal):
I am running the below Gnuplot code in Linux.
I want to know how I can run the same code on windows?
Thanks a lot!
reset
set termoption dash
set terminal postscript portrait enhanced color "Helvetica" 10
set output '| ps2pdf - Plot.pdf'
set datafile separator ","
mag = 5
set grid
set border 31 lw 1
set key off
set style line 1 lt 1 lw 10 pt 6 ps 0.4 lc rgb '#D3D3D3'
TET_0011 = "/home/soheil/university/quadratic/KAPPA & MU/TET-VOIGT-SR-0.01.txt"
plot TET_0011 u 1:4 w l ls 1 title "VOIGT"
Gnuplot is supported on windows using Cygwin or MinGW.
Checkout the binary download page for gnuplot windows binaries.
The gnuplot code you post above will remain the same.
The only problem i see on windows is the lack os ps2pdf
Fortunately, you could set to generate PDF directly, instead of set terminal postscript ... you should have pdfcairo terminal
set terminal pdfcairo OPTIONS
It is available on gnuplot on windows, v5.0.x
I'm trying to get part of the answer in https://stackoverflow.com/a/27534509/257924 to work but am running into a Bad format character error.
Only when I comment out the set table command below, do I get the error (execute this as a script on Linux). Below, I'm expecting /tmp/temporaryfile.dat to be generated and not a plot image file:
#!/bin/bash
datafile=/tmp/mydata.1
cat > $datafile <<EOF
2013/5/1 1
2013/5/1 1
2013/5/1 1
2013/6/1 2
2013/6/1 2
EOF
gnuplot_in=/tmp/gnuplot.in
gnuplot_out=/tmp/gnuplot.png
cat > $gnuplot_in <<EOF
set xdata time
set timefmt '%Y/%m/%d'
set table '/tmp/temporaryfile.dat'
set format x '%Y/%m/%d'
plot "$datafile" using (timecolumn(1)):2 title "thetitle" with linespoints;
unset table
EOF
# Show the input with line numbers for debugging:
grep -n '.*' $gnuplot_in
gnuplot $gnuplot_in
#eog $gnuplot_out
The error is:
1: set xdata time
2: set timefmt '%Y/%m/%d'
3: set table '/tmp/temporaryfile.dat'
4: set format x '%Y/%m/%d'
5: plot "/tmp/mydata.1" using (timecolumn(1)):2 title "thetitle" with linespoints;
6: unset table
"/tmp/gnuplot.in", line 5: Bad format character
I've already checked the script for accidental UNICODE characters as indicated by gnuplot error: Bad format character
What would cause this error and how do I fix it?
I've concluded that this is due to a bug in the version of gnuplot on my RHEL 6.6 machine. On my RHEL 6.6 machine we have this version of gnuplot:
gnuplot 4.2 patchlevel 0
On my Debian system, the script works without errors, using this version of gnuplot:
gnuplot 4.6 patchlevel 0
In sample.dat I have:
set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 500, 350
set output 'simple.2.png'
plot [-pi/2:pi] cos(x),-(sin(x) > sin(x+1) ? sin(x) : sin(x+1))
From ubuntu/terminal I execute:
gnuplot -e "filename='sample.dat'"
but the simple.2.png file is not created. How do I export a plot to e.g png using gnuplot from command line?
I have no idea where you got that from!
To execute a gnuplot script (here called simple.gp), simply call
gnuplot simple.gp
You should keep the extension .dat for data files.
As the title above said, I have a CentOS5.5 with /etc/sysconfig/i18n:
LANG="en_US"
#SYSFONT="latarcyrheb-sun16"
and the output of locale is:
LANG=en_US
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=
I see nothing about encoding, what's the default encoding if not set?
It's dependent on the locale. For en_US it's ISO 8859-1.