Hello everyone, I’am trying to fix title encoding of plot. While im plotting new graph with Turkish characters pygmt not giving proper output. I added the graph below the code.
import pygmt
import numpy as np
import pandas as pdwith open(“tusaga_ist_ad.txt”, “r”) as ist:
ist_ad = ist.read().splitlines()with open(“tusaga_ist_kord.txt”, “r”) as ist:
ist_kord = ist.read().splitlines()enlem=;boylam=
for i in ist_kord:
enlem.append(i.split(" “)[0])
boylam.append(i.split(” ")[1])ist.close()
pygmt.config(PS_CHAR_ENCODING=‘ISO-8859-9’)
pygmt.config(GMT_LANGUAGE=‘TR’)fig = pygmt.Figure()
fig.coast(
region=[24,45,35,43],
projection=“M15i”,
land=“white”,
water=“lightblue”,
shorelines=True,
resolution=“f”,
borders=“a”,
frame=[“xa2”,“ya2”, “WSne+tTUSAGA-Aktif İstasyonları”],
)fig.plot(x=boylam, y=enlem, style=“i0.25c”, color=“black”, pen=“black”)
fig.text(x=boylam, y=enlem, text=ist_ad, offset=“0c/0.2c”, font=“5p” )
fig.show()