Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否有任何方法可以在 Jupyter 中指定内联图的大小。目前,我使用 Vega 库,宽度和高度不起作用。有任何解决方法。
要在 Jupyter Notebook 中使用 Vega.jl 更改绘图大小,请修改width和height属性:
width
height
using Vega #defaults are width = 450 and height = 450 b = barplot(x = [1,2,3], y = [1,2,3]) #change to whatever values you want b.width = 200 b.height = 50 #re-render b
我不了解 Vega,但我认为 ijulia 有一个环境变量。使用 Plots,您只需default(size = (1000, 300)).
default(size = (1000, 300))
这应该适用于 Plots.jl:
using Plots plot(1:5, size=(1000,1000))