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

Home » Public Forums » archive » Re: bar_plot and ploterr
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: bar_plot and ploterr [message #67002] Fri, 26 June 2009 07:06
Nicolas Aunai is currently offline  Nicolas Aunai
Messages: 5
Registered: May 2009
Junior Member
thanks a lot, it works perfectly.

--
nico


greg wrote:
> The required values are calculated inside the bar_plot routine, but
> not returned. A simple solution is to tag on a tickv=tickv to the end
> of the bar_plot declaration...
>
> pro
> bar_plot,values,baselines=baselines,colors=colors,barnames=b arnamesIn,
> $
> title=title,xtitle=xtitle,ytitle=ytitle,baserange=baserange,
> $
> barwidth=barwidth,barspace=barspaceIn,baroffset=baroffset, $
> outline=outline,overplot=overplot,background=background, $
> rotate=rotate,tickv=tickv
>
> Then you may modify your code like this:
>
> bar_plot,tab,tickv=tickv
> plots,tickv,1,psym=4,color=200
> xyouts, tickv[2],1,'does it work ?', /data,color=255
>
> regards,
> Greg
>
> On Jun 26, 9:21 am, Nicolas Aunai <nicolas.au...@free.fr> wrote:
>> Maarten wrote:
>>>> My problem is that I can't figure out the x coordinate of the
>>>> center of the bars...
>>> I think they are [0,1,2,3,4,5], but you may want to show some code to
>>> be sure.
>> Hello,
>>
>> tahnk you for your answer, here is an example :
>>
>> device, decomposed=0,retain=2
>> loadct,39,/silent
>> tab = indgen(4)
>> bar_plot,tab
>> xyouts, 2,1,'does it work ?', /data,color=255
>> plots,1,1,psym=4,color=200
>>
>> result :http://nau.cetp.ipsl.fr/bar_plot.png
>>
>> Nico
>
Re: bar_plot and ploterr [message #67007 is a reply to message #67002] Fri, 26 June 2009 02:42 Go to previous message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
The required values are calculated inside the bar_plot routine, but
not returned. A simple solution is to tag on a tickv=tickv to the end
of the bar_plot declaration...

pro
bar_plot,values,baselines=baselines,colors=colors,barnames=b arnamesIn,
$
title=title,xtitle=xtitle,ytitle=ytitle,baserange=baserange,
$
barwidth=barwidth,barspace=barspaceIn,baroffset=baroffset, $
outline=outline,overplot=overplot,background=background, $
rotate=rotate,tickv=tickv

Then you may modify your code like this:

bar_plot,tab,tickv=tickv
plots,tickv,1,psym=4,color=200
xyouts, tickv[2],1,'does it work ?', /data,color=255

regards,
Greg

On Jun 26, 9:21 am, Nicolas Aunai <nicolas.au...@free.fr> wrote:
> Maarten wrote:
>>> My problem is that I can't figure out the x coordinate of the
>>> center of the bars...
>
>> I think they are [0,1,2,3,4,5], but you may want to show some code to
>> be sure.
>
> Hello,
>
> tahnk you for your answer, here is an example :
>
> device, decomposed=0,retain=2
> loadct,39,/silent
> tab = indgen(4)
> bar_plot,tab
> xyouts, 2,1,'does it work ?', /data,color=255
> plots,1,1,psym=4,color=200
>
> result :http://nau.cetp.ipsl.fr/bar_plot.png
>
> Nico
Re: bar_plot and ploterr [message #67008 is a reply to message #67007] Fri, 26 June 2009 00:21 Go to previous message
Nicolas Aunai is currently offline  Nicolas Aunai
Messages: 5
Registered: May 2009
Junior Member
Maarten wrote:

>> My problem is that I can't figure out the x coordinate of the
>> center of the bars...
>
> I think they are [0,1,2,3,4,5], but you may want to show some code to
> be sure.


Hello,

tahnk you for your answer, here is an example :

device, decomposed=0,retain=2
loadct,39,/silent
tab = indgen(4)
bar_plot,tab
xyouts, 2,1,'does it work ?', /data,color=255
plots,1,1,psym=4,color=200


result : http://nau.cetp.ipsl.fr/bar_plot.png


Nico
Re: bar_plot and ploterr [message #67064 is a reply to message #67008] Wed, 24 June 2009 06:44 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Jun 24, 11:28 am, Nicolas Aunai <nicolas.au...@free.fr> wrote:
> Hello,
>
> I would like to add a point (with Y error bars) on the top of each bar
> in a plot like this one :
>
> http://nico.aunai.free.fr/thermal_fluxes.png
>
> My problem is that I can't figure out the x coordinate of the
> center of the bars...

I think they are [0,1,2,3,4,5], but you may want to show some code to
be sure.

Maarten
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Orthorectifying Quickbird scenes with RPC files
Next Topic: Re: Faster approach for total(data,dimension) possible?

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

Current Time: Wed Oct 08 15:56:56 PDT 2025

Total time taken to generate the page: 0.00447 seconds