; docformat = 'rst'
;+
; Plot x-y data using the exact range of the data (i.e. with the lowest bit of
; XSTYLE and YSTYLE set).
;
; :Params:
; x : in, required, type=fltarr
; x-coordinates of data
; y : in, required, type=fltarr
; y-coordinates of data
;
; :Keywords:
; xstyle : in, optional, type=long
; YSTYLE value for PLOT (but exact range will automatically be used)
; ystyle : in, optional, type=long
; YSTYLE value for PLOT (but exact range will automatically be used)
; _extra : in, optional, type=keywords
; keywords to PLOT
;-
pro mg_exactplot, x, y, xstyle=xstyle, ystyle=ystyle, _extra=e
compile_opt strictarr
_xstyle = n_elements(xstyle) eq 0L ? 0L : xstyle
_ystyle = n_elements(ystyle) eq 0L ? 0L : ystyle
plot, x, y, xstyle=_xstyle or 1, ystyle=_ystyle or 1, _strict_extra=e
end
; main-level example program
x = findgen(360) * !dtor
y = sin(x)
mg_exactplot, x, y, xstyle=4, color='0000ff'x
end