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

Home » Public Forums » archive » Re: Color Fonts?!?!?
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: Color Fonts?!?!? [message #30294 is a reply to message #30292] Wed, 17 April 2002 13:23 Go to previous messageGo to previous message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
On Wed, 17 Apr 2002, David Fanning wrote:
> Ken Mankoff (mankoff@I.HATE.SPAM.cs.colorado.edu) writes:
>
>> The steps to make it automatic are just that the user passes in the
>> title and the substring, and the program splits the title on the
>> substring, and then makes the 3 XYOUTS with the dynamically generated
>> substrings.
>
> Well, sorta. Assuming there are three words, you don't
> necessarily want to have them centered on the plot, etc., etc.
>
> But nice work, though. It really was easier than I thought it would
> be to come up with a one-off. That's not too bad if you need it for
> a journal article. And if you had a well-enough defined environment,
> you could even make it semi-automatic with minimal effort.

I agree that this currently works best for a simple hard-coded
journal-article type plot, but I think that this is still even easier
than you think it is. I do believe this could be a full-featured
program that handles 95% of your average PLOT and SURFACE calls, with
far less work than Hercules, Atlas, or Samson ever did. But no, I will
not write it as I have no need for this, outside of a few simple
hard-coded journal-article type plots. :)

1) There is no limitation of 3. You can pass in an array of
substrings, and an optional associated array of colors you want them,
and break the title into n substrings. The only requirement here is
that each substring matches only one regexp. But most titles do not
repeat words, so this should work.

2) You can center XYOUTS perfectly via this method: Write once
offscreen ("XYOUTS, 10, 10, /norm, title, width=w") to get the length
of the entire string (or write twice on-screen, the 2nd time in the
background color to erase it). Knowing the length of the string, and
!position, and CONVERT_COORD will allow you to make an XYOUTS
indistinguishable from an "XTITLE=" keyword to plot

3) If you then use CONVERT_COORD to work in data coordinates, I think
you could even get colors working for words in a 3D PLOT or SURFACE,
where your axes are skewed, using /T3D with XYOUTS.

-k.
--
------------------------------------------------------------ ---------------
Ken Mankoff http://lasp.colorado.edu/snoe/
http://lasp.colorado.edu/mars/
http://lasp.colorado.edu/~mankoff/ http://lasp.colorado.edu/marsrobot/
------------------------------------------------------------ ---------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Help me aviod a FOR loop!?!?
Next Topic: 24-bit color problem on Red Hat Linux 7.1

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

Current Time: Sun Oct 12 12:35:24 PDT 2025

Total time taken to generate the page: 1.99986 seconds