Re: Advice on making a plot [message #37139] |
Tue, 18 November 2003 13:53  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Lawrence Bleau writes:
> Thanks, David. This is about what I do now. I was sort of hoping for
> something along the lines of
>
> create large array A (82x22 or bigger if need be)
> fill array A with values based on some special formula
> do one TVxxx call with A to display it all at once
>
> The catch, of course, is in step 2. If each element of A is displayed as
> one pixel, then one won't be able to see the colored regions. Since the
> size of each rectangular region is L/22 wide by L/82 high, where L the the
> size of the side of the square plot region, we'd need A to be 1804x1804 (22*82),
> and each region with A would be 82 wide by 22 high, and all the same value.
I'd do it small (fast), then blow it up to the size
you need. Fortunately, someone has already written
CONGRID for us. :-)
> That's sort of what I was thinking. Of course, this could be optimized a bit
> by removing the common factor of 2. While this approach minimizes the number
> of plotting or drawing calls, it wastes temporary storage space.
>
> I'm starting to think this other approach isn't much better, and is in fact
> worse, that the double FOR loop with repeated calls to polyfill. Unless
> there's a way to dramatically improve its design. Thoughts?
Well, I wouldn't let anyone see you do it! I'd do
the drawing in a pixmap and slam that over to the
display window when I was done. It won't take less
time, but it will look professional. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
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
|
|
|