pro mg_ogplot_example, x, y, _extra=e
compile_opt strictarr
view = obj_new('IDLgrView')
model = obj_new('IDLgrModel')
view->add, model
plot = obj_new('IDLgrPlot', x, y, _extra=e)
model->add, plot
plot->getProperty, xrange=xr, yrange=yr
xc = mg_linear_function(xr, [-0.75, 0.90])
yc = mg_linear_function(yr, [-0.75, 0.90])
plot->setProperty, xcoord_conv=xc, ycoord_conv=yc
xaxis = obj_new('IDLgrAxis', direction=0, range=xr, /exact, _extra=e)
model->add, xaxis
yaxis = obj_new('IDLgrAxis', direction=1, range=yr, /exact, _extra=e)
model->add, yaxis
xaxis->setProperty, xcoord_conv=xc, ycoord_conv=yc
yaxis->setProperty, xcoord_conv=xc, ycoord_conv=yc
window = obj_new('IDLgrWindow', graphics_tree=view, _extra=e)
window->draw
end
openr, lun, filepath('damp_sn.dat', subdir=['examples', 'data']), /get_lun
dsin = bytarr(512)
readu, lun, dsin
free_lun, lun
mg_ogplot_example, findgen(512), dsin
end