Expressing the y-axis normally in semi-log plot

I’m trying to express the numbers in the y-axis as 10,25,40 instead of in powers of 10, using the following code:

using Plots

w = [19.0	,24.8	,28.5	,33.2	,35.3]
n_golpes = [35	,28	,22	,19	,16]

plot(w,n_golpes,
ylabel = "Nº DE GOLPES",
xlabel = "UMIDADE(%)",
yscale = :log10,
ylim = (10,40),
yticks = [10,25,40],
seriestype = :scatter)

hline!([25])

The output is :

Replace yticks = [10,25,40] by:
yticks = ([10,25,40], string.([10,25,40]))

1 Like