Multiline title in Plots.jl

Is there a way to create a plot title in multiple lines? In R, ggplot2 displays title in two lines if the title string has an embedded newline character.

Thanks

e.g., plot(rand(5), title="first line\nsecond line") should work in Plots, too.

2 Likes

Thank you. I just found out that this was the backend problem. gr and pyplot support this but plotly and plotlyjs do not.

From a javascript stack-overflow question i found that <br> inside the string that is your title should do the trick, and it works perfectly for me.

3 Likes

Interesting. I never use the plotly backend but I wonder if all HTML tags work?