Re: Basic Statistics with OpenEuphoria
- Posted by petelomax May 24, 2020
- 3316 views
rneu said...
https://imgur.com/a/pHzoN7h (Had to create in Python)
sequence data = {{2004,11034}, {2002,10186}, {2001,10136}, {2000, 9508}, {2003, 8719}, {2005, 8414}, {2008, 8027}, {1999, 6857}, {2007, 6836}, {2009, 6797}, {2006, 6523}, {1998, 6288}, {2010, 3828}, {2015, 3352}, {1997, 3334}, {2013, 3151}, {2012, 2987}, {2011, 2850}, {2014, 2461}, {2018, 1615}, {2016, 1409}, {2019, 1374}, {2017, 1042}, {1996, 466}, {2020, 212}, {1995, 12}} include pGUI.e Ihandle dlg, plot IupOpen() IupControlsOpen() plot = IupPlot("MENUITEMPROPERTIES=Yes, SIZE=640x320") IupSetAttribute(plot, "TITLE", "Messages"); IupSetAttribute(plot, "TITLEFONTSIZE", "10"); IupSetAttribute(plot, "TITLEFONTSTYLE", "ITALIC"); IupSetAttribute(plot, "GRIDLINESTYLE", "DOTTED"); IupSetAttribute(plot, "GRID", "YES"); IupSetAttribute(plot, "AXS_XLABEL", "Year"); IupSetAttribute(plot, "AXS_YLABEL", "Messages"); IupSetAttribute(plot, "AXS_XFONTSTYLE", "ITALIC"); IupSetAttribute(plot, "AXS_YFONTSTYLE", "ITALIC"); IupSetAttribute(plot, "AXS_YTICKSIZEAUTO", "NO"); IupSetAttribute(plot, "AXS_YTICKMAJORSIZE", "8"); IupSetAttribute(plot, "AXS_YTICKMINORSIZE", "0"); IupPlotBegin(plot) data = sort(data) for i=1 to length(data) do IupPlotAdd(plot, data[i][1], data[i][2]) end for {} = IupPlotEnd(plot) dlg = IupDialog(plot) IupCloseOnEscape(dlg) IupSetAttribute(dlg, "TITLE", "Messages") IupMap(dlg) IupShowXY(dlg,IUP_CENTER,IUP_CENTER) IupMainLoop() IupClose()