Using IDL for More Advanced Plotting

This page keeps the most useful pointers from the older “class 2” plotting notes: built-in demo material, margin and axis tricks, widget examples, and irregular surface plotting.

If you have not already done so, skim the introduction and the setup page first.

Built-in Demo Browser

The fastest way to browse IDL’s own plotting examples is still:

IDL> demo

That gives you direct examples for graphics, image processing, widgets, and maps.

Simple Plotting Tricks

The older notes emphasized a few recurring tools: !P.POSITION, legends built with XYOUTS and PLOTS, and right-side axes using AXIS, YAXIS=1.

PLOT, y1, XTITLE='Time', YTITLE='Signal 1'
OPLOT, y2, COLOR=100
AXIS, YAXIS=1, YRANGE=[0, 50], YTITLE='Signal 2', COLOR=100

The original legend demonstration image is preserved below.

IDL legend demonstration

Widget and MDS Examples

The PPPL mdsw.pro widget remains a useful large example for draw widgets, menus, event handling, and plotting against MDSplus data.

mdsw widget

Surface and Multi-Axis Examples

The older class notes also pointed at stacked plots and irregular-surface rendering.

stackplot example

vectorsurf example