Re: How can I rotate text in the axes of a bar graph? [message #82121] |
Mon, 19 November 2012 21:15 |
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  |
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.")
|
|
|