Is there an equivalent of python's PyPlot tight_layout() for Julia Plots?

As you can see in this graph, the annotation goes beyond the area of the figure. In python I’m used to fix this with pyplot.tight_layout().

howdy

d = Dict{Any, Any} with 7 entries:
  "C"                   => 10.7406
  "C ffast-math"        => 7.28659
  "Python- Built-in"    => 1631.21
  "Python numpy"        => 4.74571
  "Python hand-written" => 1942.86
  "Julia built-in"      => 6.45389
  "Julia hand-written"  => 10.7421


l_vec = sort(collect(d), by=x->x[2], rev = true)

x = map(x->x[1], l_vec)
y = map(x->x[2], l_vec)

y_annotations = [@sprintf(" %.2f ms",i) for i in y]  

Plots.bar(x ,y ,
    xaxis = ("time (ms)",false, nothing), 
    yaxis = ("Languages",false),
    orientation= :horizontal,label = "" , series_annotation = (y_annotations, font(7, :left)))

bar(x, y, right_margin = 10Plots.mm) (or however many mm you need to add to get it all to show)

1 Like

i wrote a proper post for this, I think the discussion is rich enough. here: Comparing Sum function from multiple languages

Wow. Is there any other way to do so?