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

Home » Public Forums » archive » Using TV command instead of contour
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Using TV command instead of contour [message #76947 is a reply to message #76865] Wed, 13 July 2011 08:21 Go to previous messageGo to previous message
KRDean is currently offline  KRDean
Messages: 69
Registered: July 2006
Member
On Jul 12, 4:18 am, Amit <amisra.a...@gmail.com> wrote:
> Dear Friends,
>
> I have a data in form of flags, for example, dust=1,smoke=2 and so on.
> There cannot be numbers in between.
>
> The data is in the form of 2-dimensional array, with each cell
> corresponding to a latitude, longitude pair. I want to display it --
> the output would look something like a chess board. If I use the
> CONTOUR command, it interpolates at the boundaries, producing
> incorrect plots.
> This problem is solved if I use TVIMAGE program. However, I cannot
> pass the latitude,longitude data to the command (like CONTOUR). Can
> anyone suggest me how to use TVIMAGE or TV in a way similar to
> CONTOUR?
>
> Thanks for your help
> Amit

I normally use PLOTS to display index values, like landuse data were
certain numbers represent regions. For exmaple, 10:forest and
40:grass.


Below is an example how I use PLOTS.

Kelly Dean
Milliken, Colorado

;+
;
;---------------------------------------------
PRO IndexPlot

file = FILEPATH( 'worldelv.dat', SUBDIRECTORY = ['examples', 'data'])
image = READ_BINARY(file, DATA_DIMS = [360,360])

siz = SIZE( image )
LatArr = REPLICATE( 1.0, siz[1] ) # ( ( LINDGEN( siz[2] ) * 0.5 ) -
89.5 )
LngArr = ( LINDGEN( siz[1] ) * 1.0 ) # REPLICATE (1.0, siz[2] )

west = WHERE( LngArr GT 180.0, cnt )
IF ( cnt GT 0 ) THEN LngArr[west] = LngArr[west] - 360.0

; The user defined plotting symbol ( PSYM=8 ) is used by PlotS to
; add a symbol on the plot. So the IDL routine USERSYM is used to
; create a filled symbol of a circle.

A = FINDGEN(17) * (!PI*2/16.)
USERSYM, COS(A), SIN(A), /FILL

;image = ROTATE( image,7 )

DEVICE, decompose=0
WINDOW, 0, XSIZE=siz[1], YSIZE=siz[2], TITLE='Index Plot'

LOADCT, 27 ; Assign a color table

MAP_SET, 0.0, 180.0, 0.0, /Mercator

PlotS, LngArr, LatArr, COLOR = image, $
PSYM = 8, SYMsize = 0.8, /DATA

MAP_CONTINENTS

END
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: GONG SOLAR DATA ANALYSIS IN IDL
Next Topic: Multiple-plot multiple-page landscape postscript problem

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

Current Time: Wed Oct 08 19:36:21 PDT 2025

Total time taken to generate the page: 0.00438 seconds