英文:
Julia: plot with a really large title
问题
我必须制作一个带有长标题的图表,但文字溢出图片而不是分成两三行。我该如何避免这种文字溢出。
英文:
I have to make a plot with a long title but the words overflow from the picture instead of breaking into two or three lines. How can I avoid this text overflow.
using LinearAlgebra
x = y = range(-3, stop = 3, length = 100)
surface(x, y, (x, y) -> sinc(norm([x, y])), title="A very long title with a lot of simple words none of them are really large")
答案1
得分: 0
using LinearAlgebra
using Plots
gr()
x = y = range(-3, stop = 3, length = 100)
surface(x, y, (x, y) -> sinc(norm([x, y])), title="一个非常长的标题,其中包含很多简单的词,没有一个词是真正的大词")
in case you are using plotly and plotlyjs, you need to use the html line break argument <br>
using LinearAlgebra
using Plots
plotlyjs()
x = y = range(-3, stop = 3, length = 100)
surface(x, y, (x, y) -> sinc(norm([x, y])), title="一个非常长的标题,其中包含<br>很多简单的词,没有一个词是真正的大词")
英文:
using LinearAlgebra
using Plots
gr()
x = y = range(-3, stop = 3, length = 100)
surface(x, y, (x, y) -> sinc(norm([x, y])), title="A very long title with \na lot of simple words none of them \nare really large")
in case you are using plotly and plotlyjs, you need to use the html line break argument <br>
using LinearAlgebra
using Plots
plotlyjs()
x = y = range(-3, stop = 3, length = 100)
surface(x, y, (x, y) -> sinc(norm([x, y])), title="A very long title with <br>a lot of simple words none of them <br>are really large")
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论