Hi, Iโm creating the attached figure with
pgfplotsx()
p1 = plot(๐.ลด,๐.ฤด, label = "Efficiency", color = 3, linestyle=:dash, legend = :topright, xguide = L"\hat{W}(\hat{w})", yguide = L"\hat{J}(\hat{w})") #, xguidefontvalign=:top, xguidefonthalign = :right, yguidefonthalign = :right, xguide_position = :right, yguideposition = :top)
plot!(๐.ลด[argmax(๐.ฤด):argmax(๐.ลด)],๐.ฤด[argmax(๐.ฤด):argmax(๐.ลด)], label = "Redistribution", color = 3)
plot!(xticks = ([0.0], ["0"]))
plot!(yticks = ([0.0], ["0"]))
plot!([minxlim, ๐.ลด[argmax(๐.ลด)]],[๐.ฤด[argmax(๐.ลด)],๐.ฤด[argmax(๐.ลด)]], label = "", linewidth = 1, linestyle=:dash, color = :black)
plot!([๐.ลด[argmax(๐.ลด)], ๐.ลด[argmax(๐.ลด)]],[minylim,๐.ฤด[argmax(๐.ลด)]], label = "", linewidth = 1, linestyle=:dash, color = :black)
plot!([minxlim, ๐.ลด[argmax(๐.ฤด)]],[๐.ฤด[argmax(๐.ฤด)],๐.ฤด[argmax(๐.ฤด)]], label = "", linewidth = 1, linestyle=:dash, color = :black)
plot!([๐.ลด[argmax(๐.ฤด)], ๐.ลด[argmax(๐.ฤด)]],[minylim,๐.ฤด[argmax(๐.ฤด)]], label = "", linewidth = 1, linestyle=:dash, color = :black)
scatter!([๐.ลด[argmax(๐.ลด)]],[๐.ฤด[argmax(๐.ลด)]], label = "", color = 1, marker=:square)
scatter!([๐.ลด[argmax(๐.ฤด)]],[๐.ฤด[argmax(๐.ฤด)]], label = "", color = 2, marker=:circle)
plot!(ลด_lc,IC_lc, label = "Nash Bargaining", color = 4)
xlims!((minylim, 1.5*๐.ลด[argmax(๐.ลด)]))
ylims!((minxlim, 1.5*๐.ฤด[argmax(๐.ฤด)]))
plot!(yticks = ([๐.ฤด[argmax(๐.ฤด)] ๐.ฤด[argmax(๐.ลด)]], [L"\hat{J}(\hat{w}^{\ast j})", L"\hat{J}(\hat{w}^{\ast h})"]))
plot!(xticks = ([๐.ลด[argmax(๐.ฤด)] ๐.ลด[argmax(๐.ลด)]], [L"\hat{W}(\hat{w}^{\ast j})", L"\hat{W}(\hat{w}^{\ast h})"]))
savefig(p1, "$pathfigures/x.tikz")
This is the result:
Now I want to move the xaxis labels to the position marked in red. The closest I can get is by adding:
xguidefonthalign = :right, yguidefonthalign = :right
which then produces:
As you can see, the gap between the labels and the axis is too big. Is there a way to close that gap? I have tried with annotations (but if I use annotate! then pgfplotsx() does not let met annotate outside the box).
Thanks a lot for any suggestion!