Creating a Line Plot with Object Graphics
QUESTION: How do I go about creating a line plot with axes using the new IDL 5 object graphics?
ANSWER: Object graphics requires that all graphics plots be constructed from rather low-level primatives or graphic atoms, as RSI likes to call them. In practice, what this means is that you have to create all the axes, titles, and so forth yourself and combine them to create a "view" of your data, which is what is displayed in the graphics window.
It is probably easier to show you a good example of how you might build a line plot than it is to explain the process to you. Here is well documented example of a line plot with a title and axes around the plot. It is named XPlot. You can download it by clicking here.
The XPlot program can be used like the normal PLOT command. The display window is resizeable. The line plot can be sent directly to a PostScript printer, or GIF and JPEG files can be created containing the window contents.
Here is a picture of what XPlot looks like when it is running.
Copyright © 1997 David W. Fanning
Last Updated 13 June 1997