用mathematica作二维散点图,数据为1991 20.968 1992 20.684 1993 20.264 1994 20.034 1995 19.749 1996 19.367 1997 19.045 1998 18.734 1999 18.385 2000 18.3 2001 18.17 2002 17.719 2003 17.187 2004 16.688 2005 16.064 2006 15.477 2007 15.071 2008 14.718 2009 14.455 2010 14.053 2011 13.678 2012 13.303 2013 12.975 2014 12.259 2015 12.095 2016 11.911 2017 11.318 2018 11.007 2019 10.339 2020 9.222
时间: 2024-04-04 20:28:58 浏览: 162
可以使用ListPlot函数来制作二维散点图,具体代码如下:
data = {{1991, 20.968}, {1992, 20.684}, {1993, 20.264}, {1994, 20.034}, {1995, 19.749}, {1996, 19.367}, {1997, 19.045}, {1998, 18.734}, {1999, 18.385}, {2000, 18.3}, {2001, 18.17}, {2002, 17.719}, {2003, 17.187}, {2004, 16.688}, {2005, 16.064}, {2006, 15.477}, {2007, 15.071}, {2008, 14.718}, {2009, 14.455}, {2010, 14.053}, {2011, 13.678}, {2012, 13.303}, {2013, 12.975}, {2014, 12.259}, {2015, 12.095}, {2016, 11.911}, {2017, 11.318}, {2018, 11.007}, {2019, 10.339}, {2020, 9.222}};
ListPlot[data, PlotStyle -> PointSize[0.02], AxesLabel -> {"Year", "Value"}]
运行上面的代码将会制作出一个散点图,x轴表示年份,y轴表示数据值。同时,通过设置PlotStyle -> PointSize[0.02]可以调整散点的大小,AxesLabel -> {"Year", "Value"}设置坐标轴标签。
阅读全文