comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: One plot line, different thicknesses
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: One plot line, different thicknesses [message #21735] Mon, 18 September 2000 00:00
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
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
------------------------------------------------------------ --------------
Re: One plot line, different thicknesses [message #21737 is a reply to message #21735] Mon, 18 September 2000 00:00 Go to previous message
promashkin is currently offline  promashkin
Messages: 169
Registered: December 1999
Senior Member
What is "symbol clashes"? I see no symbols used at all in the example
provided. I noticed nothing funny in how the provided examples work,
except that the last command needs to be Oplot:

plot, f
oplot, f, min=10.1, thick=2

Produces what's needed, a thin line overplotted with a thick one.
I also fail to see the reason for "plot, f, /nodata", as the very next
line replaces this first one anyway.
Cheers,
Pavel
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: CW_BGROUP
Next Topic: mod_idl?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Apr 10 07:35:07 PDT 2026

Total time taken to generate the page: 0.96508 seconds