簡體   English   中英

在Julia中求值后如何更改x的Winston圖范圍?

[英]How to change the Winston plot range of x after evaluation in Julia?

using Winston

x=[0:0.1:2pi];

y=sin(x)

plot(x,y)

當我更改x的范圍時,得到的結果與舊范圍相同。

您還必須重新計算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

將生成一個新的情節。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM