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

Home » Public Forums » archive » Advice on making a plot
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
Advice on making a plot [message #37151] Mon, 17 November 2003 10:06
bleau is currently offline  bleau
Messages: 24
Registered: November 1993
Junior Member
Hello, I'm running IDL 5.2 on OpenVMS 7.1-2. And no, I cannot upgrade, as
IDL isn't made for VMS any more :-( This is about design advice, though,
not a problem.

I've been tasked with writing code to create a plot of values. I'm given
a 2-dimensional array of values, which are bins. The bins are the same
size in each dimension, but different in the x- and y- dimensions; i.e.,
each bin is a rectangle when viewed in the x,y space.

I'm familiar with the plot command, and have an idea how to go about
writing IDL code to shade individual rectangles different colors in
specific locations on the plot field:
for i=0,n-1
for j=0,m-1
translate x(i), y(i) to plot coordinates
calculate corners of rectangle
shade rectangle appropriate color
endfor
endfor
One caveat: the final bin in each coordinate (along right and top edges) is
larger than the other bins, so its rectangle will be of a different size.

I'm thinking, though, that this operation is a bit inefficient and might be
better accomplished by treating the array of values as an image and using
some image display commands. How would this be done, though, with
non-square pixels? That's just the first problem. The second is the
different sized rectangles along the right and top sides. There may be
other problems to address which would make an image approach unwieldy.

Let me know your thoughts. Thanks.

Lawrence Bleau
University of Maryland
Physics Dept., Space Physics Group
301-405-6223
bleau@umtof.umd.edu
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Resolve_all: bogus unresolved references
Next Topic: bitmap menubars

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

Current Time: Thu Oct 09 02:15:15 PDT 2025

Total time taken to generate the page: 0.55837 seconds