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

Home » Public Forums » archive » xyouts precision
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
xyouts precision [message #42863] Thu, 03 March 2005 13:06 Go to next message
Krista is currently offline  Krista
Messages: 2
Registered: March 2005
Junior Member
Hello All,

I am trying to add a second label to the y-axis of a plot using xyouts.
However, the units of my x-axis are in Julian days and xyouts will not
let me place my label more precisely than one decimal point. Is there a
way to get a more precise placement or a better way to add the second
label? Thanks.
Re: xyouts precision [message #42958 is a reply to message #42863] Tue, 08 March 2005 06:38 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
andrew.cool@dsto.defence.gov.au (Andrew Cool) writes:


> Reimar Bauer <R.Bauer@fz-juelich.de> wrote in message news:<d097n5$hj6$2@zam602.zam.kfa-juelich.de>...
>
> [snip]
>>
>> Dear Krista,
>>
>> I am not sure to understand right but probably this is the solution
>> plot,findgen(10),ytitle='first!Csecond'
>>
>> The !C is used for the linebreak
>>
>> cheers
>> Reimar
>
> Well!! After 14 years of using IDL, I never knew this!
> And I wish I had found this out back in 1991.

I use this all the time. It's great.

One useful way to get "top-right" justified labels on graphs is to do
something like this,

xyouts, !x.crange(1), !y.crange(1), /data, '!CLabel Text ', align=1.0

The real trick is the "!C" in front. Normally, a Y coordinate of
!Y.CRANGE(1) would put the text above the top of the graph, but by
putting a carriage return, the text appears just below the top, inside
the graph.

The ALIGN=1.0 keyword puts the text against the right side of the
graph, and the few " " spaces at the end give it a bit of a margin.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: xyouts precision [message #42970 is a reply to message #42863] Sat, 05 March 2005 10:20 Go to previous message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
On Thu, 3 Mar 2005, Krista wrote:
> I am trying to add a second label to the y-axis of a plot using
> xyouts. However, the units of my x-axis are in Julian days and
> xyouts will not let me place my label more precisely than one
> decimal point. Is there a way to get a more precise placement or a
> better way to add the second label? Thanks.

I don't understand the xyouts problem you are having.
What means
> One decimal point precision
?

I get higher precision:
plot, indgen(10)
xyouts, 4, 2, 'hello world'
xyouts, 4.2, 2, 'hello world'
xyouts, 4.21, 2, 'hello world'
Are you in PS? X? using /DATA, /NORMAL, /DEVICE?

Some other useful font resources:
http://physweb.mnstate.edu/mcraig/TeXtoIDL/
http://www.astro.washington.edu/deutsch-bin/idllibsrch?keywo rd=font
http://www.dfanning.com/graphics_tips/lesign.html

-k.

--
http://spacebit.dyndns.org/
Re: xyouts precision [message #42978 is a reply to message #42863] Fri, 04 March 2005 12:03 Go to previous message
Krista is currently offline  Krista
Messages: 2
Registered: March 2005
Junior Member
Reimar,

Thank you for the help; your suggestion worked perfectly! The
linebreak feature will come in handy. Thanks again.

Krista
Re: xyouts precision [message #42992 is a reply to message #42863] Fri, 04 March 2005 01:11 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Krista wrote:

> Hello All,
>
> I am trying to add a second label to the y-axis of a plot using xyouts.
> However, the units of my x-axis are in Julian days and xyouts will not
> let me place my label more precisely than one decimal point. Is there a
> way to get a more precise placement or a better way to add the second
> label? Thanks.

Dear Krista,

I am not sure to understand right but probably this is the solution
plot,findgen(10),ytitle='first!Csecond'

The !C is used for the linebreak

cheers
Reimar

--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Error handing in embedded applications
Next Topic: Re: looking for source of a caught runtime error.

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

Current Time: Wed Oct 08 19:42:30 PDT 2025

Total time taken to generate the page: 0.00636 seconds