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 #30354 is a reply to message #30294] Thu, 18 April 2002 11:32 Go to previous messageGo to previous message
Sdavis is currently offline  Sdavis
Messages: 12
Registered: July 1998
Junior Member
On Wed, 17 Apr 2002, Ken Mankoff wrote:

>
> 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

I'm not sure I understand how to find where the XTITLE would have been
placed on the plot, in the monochrome case. If you knew where the XTITLE
would have been placed, then it seems that using XYOUTS would work great.

For example, the monochrome case would be

PLOT, findgen(20), xtitle = 'This is a cool title'

It seems to me you're saying that if I wanted the word 'cool' to be blue,
I could do the following:

1. PLOT, findgen(20)

2. Break the title string into 3 strings

3. Make 3 calls to XYOUTS

So my question is, how would I know the correct positions to send to
XYOUTS so that the xtitle appears in the same place as it would as if I
had just called

PLOT, findgen(20), xtitle='this is a cool title'

???


-Sean


>
> 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: Sat Oct 11 15:07:25 PDT 2025

Total time taken to generate the page: 0.25983 seconds