lineplots/
vis_ternaryplot.pro
includes main-level programProduce a ternary plot.
Examples
Try the main-level example program at the end of this file:
IDL> .run vis_ternaryplot
d = read_csv(filepath('ternary_data.txt', root=vis_src_root()))
vis_ternaryplot, d.field2, d.field3, d.field4, psym=5, $
color='000000'x, background='ffffff'x, $
atitle='aerosol single scattering albedo', $
btitle='Angstrom exponent', $
ctitle='back-scattering fraction'
The next example does:
n = 1000L
a = randomu(seed, n)
b = randomu(seed, n)
c = randomu(seed, n)
vis_ternaryplot, color='000000'x, background='ffffff'x, /nodata, $
atitle='A', btitle='B', ctitle='C'
vis_ternaryplot, a + 2., b, c, psym=1, symsize=0.5, color=rgb[0], /overplot
vis_ternaryplot, a, b + 2., c, psym=1, symsize=0.5, color=rgb[1], /overplot
vis_ternaryplot, a, b, c + 2., psym=1, symsize=0.5, color=rgb[2], /overplot
vis_ternaryplot, a + 1., b, c + 2., psym=1, symsize=0.5, color=rgb[3], /overplot
vis_ternaryplot, a, b + 2., c + 1., psym=1, symsize=0.5, color=rgb[4], /overplot
vis_ternaryplot, a + 2., b + 1., c, psym=1, symsize=0.5, color=rgb[5], /overplot
top vis_ternaryplot
vis_ternaryplot, a, b, c [, atitle=string] [, btitle=string] [, ctitle=string] [, xmargin=fltarr(2)] [, ymargin=fltarr(2)] [, /overplot] [, /nodata] [, _extra=keywords]
Create a ternary plot.
Parameters
- a in required type=fltarr
closer to lower left indicates higher
a
value- b in required type=fltarr
closer to lower right indicates higher
b
value- c in required type=fltarr
closer to upper middle indicates higher
c
value
Keywords
- atitle in optional type=string
title for
a
values- btitle in optional type=string
title for
b
values- ctitle in optional type=string
title for
c
values- xmargin in optional type=fltarr(2)
x-margins for plot in units of characters
- ymargin in optional type=fltarr(2)
y-margins for plot in units of characters
- overplot in optional type=boolean
set to overplot on a previously setup coordinate system
- nodata in optional type=boolean
set to create a coordinate system without plotting any data
- _extra in optional type=keywords
keywords for
PLOT
,PLOTS
, andXYOUTS
File attributes
Modification date: | Fri Jan 28 11:09:36 2011 |
Lines: | 204 |
Docformat: | rst rst |