当前位置: 动力学知识库 > 问答 > 编程问答 >

plot - Gadfly in Julia on Mint

问题描述:

I recently installed Mint OS on my system and try to use Julia's Gadfly library. On a freshly installed Julia command line (I've installed it via the recommended repositories in Julia's documentation), I installed Gadfly by typing: Pkg.add("Gadfly"). Everything seemed to work.

By invoking using Gadfly the prompt shows the following messages:

Warning: could not import Base.foldl into NumericExtensions

Warning: could not import Base.foldr into NumericExtensions

Warning: could not import Base.sum! into NumericExtensions

Warning: could not import Base.maximum! into NumericExtensions

Warning: could not import Base.minimum! into NumericExtensions

Warning: could not import StatsBase.bandwidth into Stat

Warning: could not import StatsBase.kde into Stat

I've tried to make a plot using plot(x=rand(10),y=rand(10)). All I see is the is the prompt showing Plot(...). My questions regarding this are:

  • What does this mean?
  • Did I do something wrong?
  • How can I fix this?

网友答案:

You need to draw the plot on a backend. For instance:

myplot = plot(x=rand(10),y=rand(10))
draw(PNG("myplot.png", 4inch, 3inch), myplot)

This link has more examples.

分享给朋友:
您可能感兴趣的文章:
随机阅读: