あなたは plot(pc)
がxlim
とylim
としてpar(mar = c(5, 5, 1, 5)
やお菓子data.rangesを使用して、いくつかの引数に(例えば、傷、XLIM、YLimプロパティ)を得ていない場合。これらのプロパティを使用すると、grid()
を使用できます。
pc.data = pc("Vestas_V90_1.8MW.wtg")
plot(pc.data)
par(mar = c(5, 5, 1, 5), new=T) # set par() and order to overlay
plot(pc.data[[1]], pc.data[[2]], type="n", ann=F, axes=F) # nothing but setting xy-cordinates
grid(NULL) # here, the same xy-coordinates are reproduced
# If you want to adjust grid lines to right y-axis, use berow code
:
par(mar = c(5, 5, 1, 5), new=T) # plot(pc) uses right ylim=c(0,1)
plot(pc.data[[1]], pc.data[[2]], ylim=c(0,1), type="n", ann=F, axes=F)
grid(NULL) # the xy(right)-coordinates are reproduced
# If you plot pc.object having single y-axis, use mar = c(5, 5, 1, 1)
コードには、グラフが表示されていない最後の行を除いて正常に動作します。 – SamAct
@SamAct申し訳ありません、私は編集しました。 – cuttlefish44