【问题标题】:How to change the Winston plot range of x after evaluation in Julia?在 Julia 中评估后如何更改 x 的 Winston 绘图范围?
【发布时间】:2015-03-11 05:23:20
【问题描述】:
using Winston

x=[0:0.1:2pi];

y=sin(x)

plot(x,y)

当我更改x 的范围时,我得到了与旧范围相同的结果。

【问题讨论】:

  • “结果相同”是什么意思?

标签: plot julia


【解决方案1】:

您还必须重新计算 y 并生成新图:

using Winston
x=[0:0.1:2pi];
y=sin(x)
plot(x,y)

生成第一个图,然后

x=[0:0.1:4pi]; #Re-define x
y=sin(x)       #Calculate new y
plot(x,y)      #Generate new plot

将生成一个新图。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-26
    • 1970-01-01
    • 2018-04-03
    相关资源
    最近更新 更多