julia lang - Adding global title to Plots.jl subplots -


i add global title group of subplots using plots.jl.

ideally, i'd like:

using plots pyplot() plot(rand(10,2), plot_title="main title", title=["a" "b"], layout=2) 

but, per plots.jl documentation, plot_title attribute not yet implemented:

title whole plot (not subplots) (note: not implemented)

in meanwhile, there way around it?

i'm using pyplot backend, i'm not tied it.

when using pyplot backend, can use pyplot commands alter plots figure, cf. accessing backend specific functionality julia plots.

to set title whole figure, like:

using plots p1 = plot(sin, title = "sin") p2 = plot(cos, title = "cos") p = plot(p1, p2, top_margin=1cm) import pyplot pyplot.suptitle("trigonometric functions") pyplot.savefig("suptile_test.png") 

one needs explicitly call pyplot.savefig see effect of pyplot functions.

note changes made using pyplot interface overwritten when use plots function.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -