有的时候我们画散点图,想把散点的坐标表示出来,那么我们这次就来看一下如何来实现

有两种方法,我就直接放代码了

法一:
ListPlot[
 Table[Tooltip[Prime[i]], {i, 10}],
 Epilog -> {Table[
    Inset[{k, Prime[k]}, {k + 0.2, Prime[k]}, {-1, 0}], {k, 10}]},
 PlotRange -> {{0, 12}, Automatic}
 ]
(*Inset的三个参数分别表示 插入的东西 插入的坐标 对齐方式*)
Mathematica数据处理(13)--显示坐标

法二:
ListPlot[Table[Labeled[Prime[i], {i, Prime[i]}, Left], {i, 10}], 
 PlotRange -> {{0, 11}, Automatic}]
Mathematica数据处理(13)--显示坐标

2016/8/20

以上,所有

相关文章:

  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2021-05-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-04-12
  • 2021-09-01
  • 2022-01-14
  • 2022-12-23
  • 2021-08-14
相关资源
相似解决方案