Mathematica: How to obtain data points plotted by plot command?

后端 未结 7 1766
[愿得一人]
[愿得一人] 2021-01-30 15:34

When plotting a function using Plot, I would like to obtain the set of data points plotted by the Plot command.

For instance, how can I obtain the list of points {t,f} P

7条回答
  •  有刺的猬
    2021-01-30 16:02

    Just look into structure of plot (for different type of plots there would be a little bit different structure) and use something like that:

    plt = Plot[Sin[x], {x, 0, 1}];
    lstpoint = plt[[1, 1, 3, 2, 1]];
    

提交回复
热议问题