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 #87753 is a reply to message #87752] Wed, 26 February 2014 03:15 Go to previous messageGo to previous message
Federico Tosi is currently offline  Federico Tosi
Messages: 4
Registered: February 2014
Junior Member
Helder,

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.

Cheers,
Federico


Il giorno mercoledì 26 febbraio 2014 11:09:30 UTC+1, Helder ha scritto:

> I don't see a problem in doing this. If you read the documentation David has provided, then this is how I would do it: you will find two keywords you can use: barcoords and barnames (only if you want to show these).
>
>
>
> How's this for you:
>
> cgBarPlot, findgen(10), barcoords=findgen(10)*10.0, barnames=string(findgen(10)*10.0,format='(f0.1)')
>
>
>
> Or if you want it centered in the middle, just change that to
>
>
>
> cgBarPlot, findgen(10)+1.0, barcoords=findgen(10)*10.0+5.0, barnames=string(findgen(10)*10.0+5.0,format='(f0.1)')
>
>
>
> What you have to figure out is what you give as input to cgBarPlot. If for the range 0-10 you give 0 or 10. Ideally you will want to use (low+high)/2.0. How you calculate that, depends on the input you have.
>
>
>
> Cheers,
>
> h
[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 09:33:02 PDT 2025

Total time taken to generate the page: 1.52168 seconds