Hi all!
I’m using the GR backend to create a plot. The axis label is written with a LatexString
, but for some reason, there is almost no space between the tick labels and the axis label. I’ve been trying for a while to find a solution but couldn’t. Is there a simple way to deal with this situation?
Thank you!
Edit - my plotting environment looks like this:
using Plots
using LaTeXStrings
using Distributions
#Plotting function with latex string
function plot_normal(mu, sigma, label_x)
x = range(mu - 4*sigma, stop=mu + 4*sigma, length=1000)
y = pdf(Normal(mu, sigma), x)
plot(x, y, label="", linewidth=2)
xlabel!(label_x)
end
#LateX string label
label_x = L"Normal Distribution: $x$"
#subplot1
plot1 = plot_normal(0, 1, label_x)
#subplot2
plot2 = plot_normal(5, 2, label_x)
#Main plot
combined_plot = plot(plot1, plot2, layout=(1, 2), size=(800, 400))