vis/lineplots/
mg_slopegraph.pro
direct graphics
Produce a comparison chart as shown in the examples section.
Examples
See the main-level example program:
IDL> .run mg_slopegraph
The slopegraph concept and the data for this example were taken from *The Visual Display of Quantitative Information* by Edward Tufte.
Routines
Routines from mg_slopegraph.pro
result = mg_slopegraph_spread(values, charHeight, lineHeight)
Spread out text lines that are too close to each other.
mg_slopegraph, names, startValues, endValues [, start_title=string] [, end_title=string] [, title=string] [, line_color=long] [, value_format=string] [, text_color=long] [, delimiter=string] [, _extra=keywords]
Creates a comparison chart.
Routine details
top mg_slopegraph_spread
result = mg_slopegraph_spread(values, charHeight, lineHeight)
Spread out text lines that are too close to each other.
Return value
fltarr
Parameters
- values in required type=fltarr
values to spread
- charHeight in required type=float
height of a character in data coordinates
- lineHeight in required type=float
height of a line of text in data coordinates (baseline to baseline)
Other attributes
- Bugs:
this should probably be an iterative process because fixing up the values could actually cause more problems in certain cases
top mg_slopegraph
mg_slopegraph, names, startValues, endValues [, start_title=string] [, end_title=string] [, title=string] [, line_color=long] [, value_format=string] [, text_color=long] [, delimiter=string] [, _extra=keywords]
Creates a comparison chart.
Parameters
- names in required type=strarr
names of the items in the comparison
- startValues in required type=fltarr
starting values of the items in the same order as names
- endValues in required type=fltarr
ending values of the items in the same order as names
Keywords
- start_title in optional type=string
title over column of starting values
- end_title in optional type=string
title over column of ending values
- title in optional type=string
main title
- line_color in optional type=long
color of lines
- value_format in optional type=string
format code for printing values
- text_color in optional type=long
color of text
- delimiter in optional type=string
text to include between names and printed values
- _extra in optional type=keywords
keywords to PLOT, PLOTS, and XYOUTS
File attributes
Modification date: | Wed May 14 15:07:15 2014 |
Lines: | 107 |
Docformat: | rst rst |
Contact me if you have enhancement requests or bug fixes.