Plotting the data with scrollable x (time/horizontal) axis on Linux

前端 未结 2 1452
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-30 12:21

I want to plot data where x axis is long. If I plot the whole x axis then the plot shrinks and it is almost unreadable. I\'ve found this answer on SO which points to followi

2条回答
  •  青春惊慌失措
    2020-11-30 12:39

    In R this answer could help you. It will save the plot as a separate png, but you can change the format type with a different command. The relevant code from that answer is reproduced:

     png("wide.png", width = 1e5, height = 500)
     plot((sin(1:10000/100)+rnorm(10000)/5),type='l')
     dev.off()
     #bmp("wide.bmp", width = 1e5, height = 500)
     #plot((sin(1:10000/100)+rnorm(10000)/5),type='l')
     #dev.off()
     #note that the png has a size of 396 KB, while the bmp has 48,830 KB.
    

提交回复
热议问题