用mathematica作二维散点图,数据为1991.00 12.98 1992.00 11.63 1993.00 11.45 1994.00 11.21 1995.00 10.55 1996.00 10.42 1997.00 10.06 1998.00 9.14 1999.00 8.18 2000.00 7.58 2001.00 6.95 2002.00 6.45 2003.00 6.01 2004.00 5.87 2005.00 5.89 2006.00 5.28 2007.00 5.17 2008.00 5.08 2009.00 4.87 2010.00 4.79 2011.00 6.13 2012.00 7.44 2013.00 5.9 2014.00 6.71 2015.00 4.92 2016.00 6.53 2017.00 5.58 2018.00 3.78 2019.00 3.32 2020.00 1.45
时间: 2024-03-21 22:39:06 浏览: 63
你可以使用以下代码绘制二维散点图:
```
data = {{1991.00, 12.98}, {1992.00, 11.63}, {1993.00, 11.45}, {1994.00, 11.21}, {1995.00, 10.55}, {1996.00, 10.42}, {1997.00, 10.06}, {1998.00, 9.14}, {1999.00, 8.18}, {2000.00, 7.58}, {2001.00, 6.95}, {2002.00, 6.45}, {2003.00, 6.01}, {2004.00, 5.87}, {2005.00, 5.89}, {2006.00, 5.28}, {2007.00, 5.17}, {2008.00, 5.08}, {2009.00, 4.87}, {2010.00, 4.79}, {2011.00, 6.13}, {2012.00, 7.44}, {2013.00, 5.9}, {2014.00, 6.71}, {2015.00, 4.92}, {2016.00, 6.53}, {2017.00, 5.58}, {2018.00, 3.78}, {2019.00, 3.32}, {2020.00, 1.45}};
ListPlot[data, PlotStyle -> PointSize[0.02], Frame -> True, FrameLabel -> {"Year", "Value"}, PlotRange -> All]
```
这段代码会将数据存储在`data`变量中,并使用`ListPlot`绘制散点图。`PlotStyle -> PointSize[0.02]`用于设置散点的大小,`Frame -> True`和`FrameLabel -> {"Year", "Value"}`用于添加坐标轴和标签,`PlotRange -> All`用于自适应调整坐标轴的范围。你可以将代码复制到Mathematica中运行。
阅读全文