Skip to content

border of bars in lattice barchart

3 messages · Ulises M. Alvarez, Kosenkov Kirill, Deepayan Sarkar

#
Hi!

Take a look at:

'trellis.par.get', and
'trellis.par.set'

Good look!
On Thu, 8 May 2003, Kosenkov Kirill wrote:

            

  
    
#
Hello!

How to change a color (or linewidth) of
border in lattice 'barchart'?

I am trying

barchart(
	(......) - my arguments
            panel=function(x,y,color,subscripts,groups,...)
            {
panel.barchart(x=x,y=y,box.ratio=2,col=color,border=FALSE)
            }))

or
...
panel.barchart(x=x,y=y,box.ratio=2,col=color,border='transparent')
...
or
panel.barchart(x=x,y=y,box.ratio=2,col=color,border='red')

but it has no effect.

is there any other way to change a barchart border?
#
On Thursday 08 May 2003 11:08 am, Kosenkov Kirill wrote:
Write your own panel function. Start with the default (panel.barchart), and in 
the appropriate grid.rect() calls, change the 

gp = gpar(fill = <...>) 

to 

gp = gpar(fill = <...>, col = <whatever you want>, lwd = <whatever you want>) 

Deepayan