22 lines
531 B
Text
22 lines
531 B
Text
include pGUI.e
|
|
|
|
constant x = {0,1,2,3,4,5,6,7,8,9,10}
|
|
constant y = {1,6,17,34,57,86,121,162,209,262,321}
|
|
|
|
IupOpen()
|
|
|
|
Ihandle plot = IupPlot("GRID=YES, MARGINLEFT=50, MARGINBOTTOM=40")
|
|
-- (just add ", AXS_YSCALE=LOG10" for a nice log scale)
|
|
IupPlotBegin(plot, 0)
|
|
for i=1 to length(x) do
|
|
IupPlotAdd(plot, x[i], y[i])
|
|
end for
|
|
{} = IupPlotEnd(plot)
|
|
|
|
Ihandle dlg = IupDialog(plot)
|
|
IupSetAttributes(dlg, "RASTERSIZE=%dx%d", {640, 480})
|
|
IupSetAttribute(dlg, "TITLE", "simple plot")
|
|
IupShow(dlg)
|
|
|
|
IupMainLoop()
|
|
IupClose()
|