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

Home » Public Forums » archive » Shaded circles request.
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
Shaded circles request. [message #7910] Mon, 27 January 1997 00:00 Go to next message
D.Kennedy is currently offline  D.Kennedy
Messages: 26
Registered: January 1997
Junior Member
Hi, apologies in advance for an almost 'do my work' question, but
I'm a bit stumped as to where to start with something.

I wish to draw a plot with North-South and East-West axes upon which is
drawn an incomplete grid of points. For each point I wish to have
a circle drawn which is filled with a colour indicating the strength
of the data point.
Problems with this:
(1) I want to label the axes with a minimum of fuss, so I'd like to
preserve their values (not 0->array size) from the start.
(2) How can I draw filled circles?
(3) How can I get the filled cirles to automatically scale according to their
value?

Mmm, not as clear as I wished. You see I had a program to use TRIANGULATE
and TRIGRID to remap my 2d array of data onto a large grid and then print that as
filled contours, however my data is strictly not from points, its
from a 'region', hence the filled circle alternate approach. The problem
is that I'm finding it very difficult to do, I basically can't get started.
Any advice?
I can't quite think of an approach for this.

E-mail and post please, my newserver does tend to pass out from excitment
now and again and, as this is work related, I'd rather not miss a post that
way.

Thanks.
--
David Kennedy, Dept. of Pure & Applied Physics, Queen's University of Belfast
Email: D.Kennedy@Queens-Belfast.ac.uk | URL: http://star.pst.qub.ac.uk/~dcjk/
Hi! I'm a .signature virus! Copy me into yours and join the fun!
Re: Shaded circles request. [message #7996 is a reply to message #7910] Tue, 28 January 1997 00:00 Go to previous message
Kevin Ivory is currently offline  Kevin Ivory
Messages: 71
Registered: January 1997
Member
David Fanning gave good tips for the original post from David
Kennedy and supplied source code to return circle coordinates.
The code uses a for loop to calculate the coordinates. It is
generally better to use IDL's implicit array handling.
An IDL function using my preferred method would look like:

function circle, xcenter, ycenter, radius
a = (2*!pi/99.)*findgen(100)
x = xcenter + radius * cos(a)
y = ycenter + radius * sin(a)
return, transpose([[x],[y]])
end

Best regards
Kevin
--
Kevin Ivory Tel: +49 5556 979 434
Max-Planck-Institut fuer Aeronomie Fax: +49 5556 979 240
Postfach 20 mailto:kivory2@gwdg.de
D-37189 Katlenburg-Lindau, GERMANY http://www.gwdg.de/~kivory2/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Puzzled by colour tables...
Next Topic: Circle drawing request.

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

Current Time: Fri Oct 10 07:55:19 PDT 2025

Total time taken to generate the page: 0.79993 seconds