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

Home » Public Forums » archive » Re: How can I rotate text in the axes of a bar graph?
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
Re: How can I rotate text in the axes of a bar graph? [message #82121] Mon, 19 November 2012 21:15
Marta Yebra is currently offline  Marta Yebra
Messages: 16
Registered: August 2012
Junior Member
On Tuesday, 20 November 2012 11:25:06 UTC+11, David Fanning wrote:
> Marta Yebra writes:
>
>
>
>> Hi guys, I need to rotate the text of the categorical axes of a bar graph 270 to make the text vertical (otherwise the text overlaps and I cannot read anything). Any idea how to do it with cgBarPlot?
>
>
>
> To do this, you will have to alter the cgBarPlot code to
>
> suppress the labeling of the axis. Then add your own
>
> axis labels with cgText. You can see how this is done
>
> by looking at the code in cgDCBar, where this is done
>
> with discrete color bars. Getting the spacing right
>
> as you rotate the text is the fun part of this
>
> programming exercise. :-)
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

ufff.. de fun part of the exercise make me think that maybe is better to make the plot in excel!

Thanks David!

Marta
Re: How can I rotate text in the axes of a bar graph? [message #82126 is a reply to message #82121] Mon, 19 November 2012 16:25 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Marta Yebra writes:

> Hi guys, I need to rotate the text of the categorical axes of a bar graph 270 to make the text vertical (otherwise the text overlaps and I cannot read anything). Any idea how to do it with cgBarPlot?

To do this, you will have to alter the cgBarPlot code to
suppress the labeling of the axis. Then add your own
axis labels with cgText. You can see how this is done
by looking at the code in cgDCBar, where this is done
with discrete color bars. Getting the spacing right
as you rotate the text is the fun part of this
programming exercise. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Saving via ImageMagick with Coyote Routines fails II
Next Topic: amazing weirdness! !PATH screwed up MEAN function

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

Current Time: Wed Oct 08 13:38:33 PDT 2025

Total time taken to generate the page: 0.00657 seconds