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

Home » Public Forums » archive » Re: PlotS and symbol characteristics
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: PlotS and symbol characteristics [message #27939] Tue, 13 November 2001 12:15 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ben Tupper (btupper@bigelow.org) writes:

> Thanks for any thoughts on this,

I've no thoughts on the matter. I think what you
wrote sums the situation up nicely.

Cheers,

David

P.S. For what's its worth, you can always
write BT_PLOTS, which works the way PLOTS
*should* work. That's what we do for TV
with TVIMAGE, IMGDISP, PLOTIMAGE, and the
like. :-)

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: PlotS and symbol characteristics [message #28069 is a reply to message #27939] Thu, 15 November 2001 06:11 Go to previous message
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
Hi,

Here's my stab at it. I had the bright idea of using the name
PlotSym. After I peeked at Eric D's database of IDL routines,
I realized that was a well worn path and wasn't such a bright
idea after all. So here's oPlotS which should work as a drop
in replacement for PlotS.

Ben



David Fanning wrote:

>
>
> P.S. For what's its worth, you can always
> write BT_PLOTS, which works the way PLOTS
> *should* work. That's what we do for TV
> with TVIMAGE, IMGDISP, PLOTIMAGE, and the
> like. :-)
>
>

;----START
;+
; NAME:
; OPLOTS
;
; PURPOSE:
; This procedure serves as a wrapper around the PLOTS
procedure.
; Symbol charcteristics PSYM, COLOR, THICK and SYMSIZE maybe
; specified as scalars, vectors or not at all. The default for
each is the contents
; the relevent !P field. If there are more data points than
elements in anyone
; of these keywords, then values of the keyword are cyclically
repeated.
;
; CATEGORY:
; Direct graphics
;
; See online help for PLOTS for details.
;
; EXAMPLE:
;
;IDL> tek_color
;IDL> num = 50
;IDL> x = findgen(num)
;IDL> y = x^2
;IDL> PLOT, X, Y, /noData
;IDL> Color = Indgen(5)+3
;IDL> Psym = [1,2,4,5,6]
;IDL> SymSIze = [0.5, 1.0, 2.0]
;IDL> Thick = [0.5, 1.0, 2.0]
;IDL> oPlotS, X, Y, Color = Color, Psym = Psym, Thick = Thick,
SymSize = SymSize, /Data
;
; MODIFICATION HISTORY:
; 14 NOV 2001
; Goaded into doing it by David Fanning.
; Ben Tupper
; pemaquidriver@tidewater.net
;
;-

PRO oPlotS, X, Y, Z, $
PSym = Psym, Color = Color, $
SymSize = SymSize, Thick = Thick, $
_Extra = extra

n = n_elements(X)
nc = n_elements(color)
If nc EQ 0 Then Begin
Color = !P.Color
nc = 1L
EndIf

ns = n_elements(SymSize)
If ns EQ 0 Then Begin
SymSize = !P.symsize
ns = 1L
EndIf

np = n_elements(Psym)
If np EQ 0 Then Begin
Psym = !P.PSym
np = 1L
EndIf

nt = n_elements(Thick)
If nt EQ 0 Then Begin
thick = !P.Thick
nt = 1L
EndIf

Case n_params() of

2:For i = 0L, n-1 Do PlotS, X[i], Y[i], $
Color = Color[i MOD nc], $
Psym = Psym[i MOD np], $
Thick = Thick[i MOD nt], $
SymSize = SymSize[i MOD ns], $
_Extra = extra

3: For i = 0L, n-1 Do PlotS, X[i], Y[i], Z[i], $
Color = Color[i MOD nc], $
Psym = Psym[i MOD np], $
Thick = Thick[i MOD nt], $
SymSize = SymSize[i MOD ns], $
_Extra = extra

ELSE: Message, 'Must provide 2 or 3 arguments!'

EndCase

Return
END
;----END

--
Ben Tupper
248 Lower Round Pond Road
POB 106
Bristol, ME 04539

Tel: (207) 563-1048
Email: PemaquidRiver@tidewater.net
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: OT(ish): ANA seems to be back
Next Topic: Re: CALL_EXTERNAL simple problem ?

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

Current Time: Wed Oct 08 13:43:49 PDT 2025

Total time taken to generate the page: 0.00475 seconds