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

Home » Public Forums » archive » Different charsize for axis title and labels?
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
Different charsize for axis title and labels? [message #85866] Sun, 15 September 2013 12:21 Go to next message
Paul Levine is currently offline  Paul Levine
Messages: 29
Registered: February 2008
Junior Member
Another simple axis labeling question that is probably very basic but
is confounding me:

Can the size of the text in axis titles be set independently from axis
labels? [XYZ]CHARSIZE sets both. Must I simply leave the title out of
the call to AXIS and instead use XYOUTS (or cgText)?

Thanks in advance
Re: Different charsize for axis title and labels? [message #85868 is a reply to message #85866] Sun, 15 September 2013 14:29 Go to previous messageGo to next message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
On Sunday, September 15, 2013 3:21:36 PM UTC-4, Paul Levine wrote:
> Another simple axis labeling question that is probably very basic but
>
> is confounding me:
>
>
>
> Can the size of the text in axis titles be set independently from axis
>
> labels? [XYZ]CHARSIZE sets both. Must I simply leave the title out of
>
> the call to AXIS and instead use XYOUTS (or cgText)?
>
>
>
> Thanks in advance

I enthusiastically second this request. I typically want axis labels a few
points larger than tick labels for publication-quality plots. It should
be possible to expose the properties of the axis label independently
of those of the tick labels.

All the best,

David
Re: Different charsize for axis title and labels? [message #85869 is a reply to message #85868] Sun, 15 September 2013 15:28 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Grier writes:

>
> On Sunday, September 15, 2013 3:21:36 PM UTC-4, Paul Levine wrote:
>> Another simple axis labeling question that is probably very basic but
>>
>> is confounding me:
>>
>>
>>
>> Can the size of the text in axis titles be set independently from axis
>>
>> labels? [XYZ]CHARSIZE sets both. Must I simply leave the title out of
>>
>> the call to AXIS and instead use XYOUTS (or cgText)?
>>
>>
>>
>> Thanks in advance
>
> I enthusiastically second this request. I typically want axis labels a few
> points larger than tick labels for publication-quality plots. It should
> be possible to expose the properties of the axis label independently
> of those of the tick labels.

Try the [XYZ]Charsize keywords. These are scaled in relationship to the
value established by the CHARSIZE keyword.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Different charsize for axis title and labels? [message #85870 is a reply to message #85869] Sun, 15 September 2013 18:22 Go to previous messageGo to next message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
On Sunday, September 15, 2013 6:28:20 PM UTC-4, David Fanning wrote:
> David Grier writes:
>
>
>
>>
>
>> On Sunday, September 15, 2013 3:21:36 PM UTC-4, Paul Levine wrote:
>
>>> Another simple axis labeling question that is probably very basic but
>
>>>
>
>>> is confounding me:
>
>>>
>
>>>
>
>>>
>
>>> Can the size of the text in axis titles be set independently from axis
>
>>>
>
>>> labels? [XYZ]CHARSIZE sets both. Must I simply leave the title out of
>
>>>
>
>>> the call to AXIS and instead use XYOUTS (or cgText)?
>
>>>
>
>>>
>
>>>
>
>>> Thanks in advance
>
>>
>
>> I enthusiastically second this request. I typically want axis labels a few
>
>> points larger than tick labels for publication-quality plots. It should
>
>> be possible to expose the properties of the axis label independently
>
>> of those of the tick labels.
>
>
>
> Try the [XYZ]Charsize keywords. These are scaled in relationship to the
>
> value established by the CHARSIZE keyword.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

Setting charsize and [x,y,z]charsize works for direct graphics. In function graphics,
however, the only accessible property is FONT_SIZE, which sets the same size for
both the axis title and the tick labels. This seems to be a limitation of the underlying
AXIS object which has the property TICKFONT_SIZE, but not a separate property for
the title font size.

Perhaps if there were some way to get access to the IDLgrAxis object that must be
the basis for AXIS, it would be possible to set properties for the title, which is an
IDLgrText object. I haven't cracked that nut yet, unfortunately.

All the best,

David
Re: Different charsize for axis title and labels? [message #85873 is a reply to message #85869] Sun, 15 September 2013 22:26 Go to previous messageGo to next message
Paul Levine is currently offline  Paul Levine
Messages: 29
Registered: February 2008
Junior Member
On 2013-09-15 22:28:20 +0000, David Fanning said:

> David Grier writes:
>
>>
>> On Sunday, September 15, 2013 3:21:36 PM UTC-4, Paul Levine wrote:
>>> Another simple axis labeling question that is probably very basic but
>>>
>>> is confounding me:
>>>
>>>
>>>
>>> Can the size of the text in axis titles be set independently from axis
>>>
>>> labels? [XYZ]CHARSIZE sets both. Must I simply leave the title out of
>>>
>>> the call to AXIS and instead use XYOUTS (or cgText)?
>>>
>>>
>>>
>>> Thanks in advance
>>
>> I enthusiastically second this request. I typically want axis labels a few
>> points larger than tick labels for publication-quality plots. It should
>> be possible to expose the properties of the axis label independently
>> of those of the tick labels.
>
> Try the [XYZ]Charsize keywords. These are scaled in relationship to the
> value established by the CHARSIZE keyword.
>
> Cheers,
>
> David

Unless I am doing something wrong (quite possible!), it seems that
[XYZ]CHARSIZE, as I mentioned in my first post, scales both the axis
labels and the axis title simultaneously. I would like to make the
axis labels very small without affecting the axis title.
Re: Different charsize for axis title and labels? [message #85876 is a reply to message #85873] Mon, 16 September 2013 05:38 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul Levine writes:

> Unless I am doing something wrong (quite possible!), it seems that
> [XYZ]CHARSIZE, as I mentioned in my first post, scales both the axis
> labels and the axis title simultaneously. I would like to make the
> axis labels very small without affecting the axis title.

Yes, I misunderstood your original question. Sorry.

In direct graphics, the only way to do this would be in two steps in
which you draw the axis title in the second step with cgText or its
equivalent. The difficulty here is that the algorithm for where to place
the title text seems very difficult to come by. At least it has eluded
me for quite a number of years now. Of course, I have been known to be a
little overly anal about this kind of thing, so you might have better
luck. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Different charsize for axis title and labels? [message #85897 is a reply to message #85876] Mon, 16 September 2013 11:43 Go to previous message
Paul Levine is currently offline  Paul Levine
Messages: 29
Registered: February 2008
Junior Member
On 2013-09-16 12:38:27 +0000, David Fanning said:

> Paul Levine writes:
>
>> Unless I am doing something wrong (quite possible!), it seems that
>> [XYZ]CHARSIZE, as I mentioned in my first post, scales both the axis
>> labels and the axis title simultaneously. I would like to make the
>> axis labels very small without affecting the axis title.
>
> Yes, I misunderstood your original question. Sorry.
>
> In direct graphics, the only way to do this would be in two steps in
> which you draw the axis title in the second step with cgText or its
> equivalent. The difficulty here is that the algorithm for where to place
> the title text seems very difficult to come by. At least it has eluded
> me for quite a number of years now. Of course, I have been known to be a
> little overly anal about this kind of thing, so you might have better
> luck. :-)
>
> Cheers,
>
> David

Thanks, the solution you mentioned (using cgText to place the title
after the plot or axis command is run) is what I have been doing in the
mean time, and does indeed lead to the difficulty of figuring out where
to place it. Specifically, it is the yloc that I end up needing to
find using trial and error (xloc of 0.5 using normalized coordinates
with alignment=0.5 seems to work for the horizontal placement).

The onle thing I have not yet tried, and was thinking might work, would
be to place the axis title with an additional call to axis (or cgAxis).
I will let you know if I get anywhere with that
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Texture image on a 3d curve: cgsurface and xobjview problems
Next Topic: data changes fast / Integration

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

Current Time: Wed Oct 08 15:22:18 PDT 2025

Total time taken to generate the page: 0.00580 seconds