Re: bar_plot and ploterr [message #67002] |
Fri, 26 June 2009 07:06 |
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  |
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  |
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  |
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
|
|
|