[ncl-talk] horizontal (floating) bar chart: changing individual label colors and using gsnXRefLine to indicate the average of each bar?
Rugenstein Maria
maria.rugenstein at env.ethz.ch
Mon Mar 6 07:47:42 MST 2017
Hi all,
I’m trying to ascribe the same color to the bar and its label in a horizontal (floating) bar chart.
colors = (/“red”,”blue”,”green”/)
do i=0,nbars-1
res at gsnXYBarChartColors = colors(i) <=========== works
res at tmYRLabelFontColor = colors(i) <=========== doesn’t work
…
overlay(base_plot,max_plot(i))
end do
Further, I'm wondering how to make use of the gsnXRefLine resource to indicate the average of each bar with a dot or a line. Is there any way to either shrink the gsnXRefLine down to the individual bar itself or have the whole RefLine transparent everywhere except black within its specific bar? Or do I have to parse all the different gsnXRefLines for each bar to individual polymarkers?
Attached my script — it’s a close variation of your example bar_horz_13.ncl and produces the pdf plot, which is attached as well.
Thanks for helping out!
Maria
-------------- next part --------------
A non-text attachment was scrubbed...
Name: horizontal_bar_chart_variation.pdf
Type: application/pdf
Size: 41992 bytes
Desc: horizontal_bar_chart_variation.pdf
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170306/82b490ea/attachment.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bar_horz_13_variation.ncl
Type: application/octet-stream
Size: 4373 bytes
Desc: bar_horz_13_variation.ncl
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170306/82b490ea/attachment.obj
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dummydata.txt
Url: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170306/82b490ea/attachment.txt
More information about the ncl-talk
mailing list