[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: One plot line, different thicknesses




Declan Vogt <drv102@ohm.york.ac.uk> writes:

> I want to plot a data line on a graph, and emphasize a range of the data
> by thickening the line. I'm having problems because of how the symbols
> are drawn and was wondering if anyone can help me.
> 
> 1. Use of max and min leaves a gap in the line:
> 	f=findgen(20)
> 	plot, f, /nodata
> 	plot, f, max=10.1
> 	plot, f, min=10.1, thick=2

I assume you meant to use oplot, since as Pavel mentions the PLOTs
will just overwrite each other.  I think this is a job for WHERE():

plot, f, /nodata
oplot, f
wh = where(f GT 10.1, ct)
if ct GT 0 then oplot, wh, f(wh), thick=2

This sequence plots the entire line with thin, and then overwrites
only a portion with thick.  This practice guarantees no gaps.

Craig

-- 
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------