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

Home » Public Forums » archive » Bar coordinate shift with cgBarPlot
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: Bar coordinate shift with cgBarPlot [message #87758 is a reply to message #87753] Wed, 26 February 2014 05:31 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Federico Tosi writes:

> what you suggest is a clever way to get around the problem. However, I
understand that BARCOORDS is an output parameter, rather than an input
one, hence I don't see how you can use BARCOORDS to determine the
placement of the bars on the X axis.
>
> Even in the two examples you suggested, there is always one tick below the bar, while I really would love the bar to be placed in between two ticks. And, I cannot draw the bars one by one. That's my real issue.

You are not going to be able to do anything about the ticks, but maybe
something like this will work for you:

tickNames = StrArr(5)
FOR j=0,4 DO tickNames[j] = StrTrim(j*10,2) + '-' + StrTrim(j*10+10,2)
cgBarPlot, findgen(5)+1.0, barnames=ticknames

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to composite a mapcoord object using geographic coordinate(no projection)
Next Topic: Setting axes range in function graphics

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

Current Time: Sat Oct 11 01:20:59 PDT 2025

Total time taken to generate the page: 0.88369 seconds