How to make the midline thicker in bwplot?


username

The following code is a minimal example for latticegenerating a boxplot (representing some values ​​of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick?

a71<-structure(list(n = structure(c(1L, 2L, 2L, 4L, 4L, 1L, 1L, 4L, 
2L, 1L, 1L, 2L, 2L, 4L, 2L, 2L, 3L, 4L, 1L, 2L, 2L, 3L, 2L, 2L, 
2L, 4L, 3L, 3L, 4L, 2L, 4L, 2L, 1L, 3L, 2L, 3L, 4L, 1L, 4L, 1L, 
3L, 3L, 2L, 1L, 1L, 3L, 3L, 1L, 2L, 4L, 3L, 2L, 3L, 1L, 4L, 1L, 
4L, 2L, 3L, 4L, 4L, 4L, 1L, 3L, 3L, 3L, 4L, 2L, 2L, 2L, 4L, 4L, 
4L, 1L, 4L, 3L, 2L, 2L, 4L, 4L, 3L, 2L, 2L, 2L, 1L, 2L, 3L, 3L, 
3L, 1L, 3L, 3L, 4L, 1L, 3L, 2L, 1L, 3L, 1L, 2L), .Label = c("100", 
"200", "400", "800"), class = "factor"), g = structure(c(3L, 
3L, 1L, 3L, 1L, 3L, 2L, 1L, 1L, 3L, 1L, 2L, 3L, 1L, 2L, 2L, 1L, 
3L, 1L, 2L, 3L, 2L, 2L, 2L, 3L, 1L, 1L, 3L, 3L, 2L, 1L, 1L, 3L, 
1L, 3L, 3L, 1L, 2L, 2L, 2L, 2L, 3L, 2L, 3L, 3L, 1L, 3L, 3L, 1L, 
1L, 1L, 2L, 3L, 1L, 3L, 1L, 3L, 3L, 1L, 2L, 1L, 2L, 2L, 1L, 3L, 
3L, 1L, 3L, 2L, 3L, 1L, 3L, 1L, 1L, 3L, 3L, 2L, 3L, 3L, 3L, 1L, 
3L, 3L, 2L, 3L, 3L, 2L, 2L, 2L, 3L, 2L, 2L, 3L, 1L, 2L, 3L, 3L, 
3L, 1L, 3L), .Label = c("0", "0.5", "1"), class = "factor"), 
    cr = structure(c(1L, 2L, 3L, 1L, 3L, 3L, 2L, 1L, 2L, 3L, 
    3L, 2L, 2L, 3L, 2L, 2L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 1L, 1L, 
    3L, 3L, 3L, 1L, 3L, 1L, 1L, 1L, 2L, 1L, 1L, 3L, 2L, 3L, 1L, 
    3L, 2L, 2L, 2L, 3L, 2L, 3L, 1L, 1L, 2L, 1L, 2L, 2L, 3L, 1L, 
    1L, 1L, 1L, 3L, 3L, 2L, 3L, 1L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 
    1L, 1L, 2L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 3L, 3L, 2L, 1L, 2L, 
    2L, 2L, 2L, 3L, 2L, 2L, 1L, 3L, 2L, 1L, 3L, 1L, 1L, 2L, 2L
    ), .Label = c("-0.4", "0", "0.4"), class = "factor"), bias = c(0.0162558992812201, 
    0.138354243932496, 0.0205686041691062, 0.269714433604472, 
    0.381044037439145, 0.0869422119950729, 0.331379037601084, 
    0.686894150152472, 0.0140922903231885, 0.225078933454863, 
    0.554444988164574, 0.076032683077827, 0.335284040888653, 
    0.0630810396519646, 0.358402154233125, 0.260940142571834, 
    0.141353291599136, 0.0220267076189838, 0.242149484071382, 
    0.278319984858078, 0.193105829691662, 0.0259815643559331, 
    0.318504899459259, 0.00277002060524357, 0.212681621053374, 
    0.418358846098857, 0.358916156777489, 0.438248724241505, 
    0.194398889511096, 0.2266870834128, 0.144338808446284, 0.149227951210927, 
    0.268111328952192, 0.123265441389974, 0.0376832357983068, 
    0.0353605481767078, 0.021227873083535, 0.0385614926552725, 
    0.130640111978654, 0.161865326447675, 0.174151298764213, 
    0.292085797406362, 0.198391364913347, 0.0779507859721407, 
    0.0045571464157577, 0.114734038438965, 0.0469613758623325, 
    0.64238405800387, 0.74508519247034, 0.0251182457091362, 0.217835062247358, 
    0.131159910126724, 0.130034859007596, 0.222418419987533, 
    0.0861715693619894, 0.185660520258661, 0.0940670543815277, 
    0.105680179626893, 0.215966730684923, 0.109008340760604, 
    0.0474735195202623, 0.192326789813641, 0.022147195644035, 
    0.277372858009381, 0.237574293593955, 0.123383946121193, 
    0.46406480500022, 0.123698482002945, 0.671442441453945, 0.0406004813894845, 
    0.260472754754191, 0.0151116521560003, 0.0422855023583402, 
    0.0405517218780402, 0.0441583998205882, 0.0958995639409343, 
    0.37588506579263, 0.098494760958735, 0.0928763466294421, 
    0.111205748449328, 0.413083543393392, 0.0138839674143682, 
    0.22407421093074, 0.72309883706409, 0.423231501875638, 0.141932050342199, 
    0.133808548118004, 0.331500621801688, 0.127652280721512, 
    0.132083126730013, 0.261864564503826, 0.208243130464985, 
    0.18657049493156, 0.333701537602998, 0.404884075502013, 0.470789398932934, 
    0.115008599462104, 0.177984001517338, 0.331717679106776, 
    0.0862418839846533), group = structure(c(3L, 2L, 2L, 3L, 
    1L, 3L, 3L, 2L, 2L, 1L, 3L, 2L, 2L, 2L, 1L, 3L, 2L, 3L, 1L, 
    3L, 1L, 2L, 1L, 3L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 3L, 1L, 1L, 
    3L, 2L, 3L, 1L, 3L, 2L, 1L, 2L, 1L, 1L, 2L, 1L, 3L, 1L, 2L, 
    3L, 3L, 3L, 1L, 1L, 3L, 2L, 3L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 
    2L, 1L, 1L, 1L, 3L, 2L, 2L, 1L, 1L, 3L, 3L, 3L, 2L, 1L, 3L, 
    3L, 1L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 3L, 3L, 1L, 1L, 2L, 3L, 
    1L, 1L, 3L, 2L, 1L, 3L), .Label = c("1", "2", "3"), class = "factor")), .Names = c("n", 
"g", "cr", "bias", "group"), row.names = c(8721L, 6970L, 6686L, 
9624L, 352L, 10545L, 7505L, 4216L, 6170L, 3309L, 10429L, 4302L, 
5602L, 5680L, 1530L, 9234L, 5007L, 8004L, 721L, 10038L, 502L, 
4891L, 2946L, 8502L, 622L, 1972L, 2403L, 3383L, 5880L, 1038L, 
4756L, 9506L, 2169L, 1023L, 8506L, 6239L, 7768L, 3221L, 9536L, 
5981L, 1507L, 4883L, 414L, 3117L, 3993L, 1923L, 9143L, 2673L, 
4430L, 9520L, 9363L, 10602L, 95L, 1141L, 9660L, 4285L, 10704L, 
154L, 531L, 6440L, 4876L, 7052L, 4397L, 3375L, 5075L, 1295L, 
2620L, 334L, 9510L, 4690L, 4288L, 3576L, 2248L, 7693L, 8820L, 
8135L, 4026L, 1906L, 10164L, 8616L, 423L, 5290L, 418L, 6486L, 
4485L, 7042L, 955L, 2215L, 9031L, 8049L, 2323L, 1627L, 4212L, 
8689L, 439L, 2590L, 8649L, 5447L, 1957L, 10570L), class = "data.frame")
 library(lattice)
cl<-c('red','green','blue')
mypanel<-function(...){
        panel.bwplot(...,pch="|",col="black",cex=4,fill=cl)
}
o1<-bwplot(a71$bias~a71$group|a71$cr*a71$g,type=c("l","g"),ylim=c(0,1),panel=mypanel)
plot(o1)
Ben Barnes

The lines surrounding each box plot (including the midline) can be manipulated by changing certain parameters box.rectangle( latticefigure-specific parameters ). This will change all the lines around the box, not just the center line.

myPars <- list(box.rectangle = list(lwd = 2, col = "black"))

lwdChange the line width (thickness). colChange the color of the line. Then pass this list to the par.settingsparameter bwplotin .

o1 <- bwplot(a71$bias ~ a71$group | a71$cr * a71$g,
    type = c("l", "g"), ylim = c(0, 1), panel = mypanel,
    par.settings = myPars)
plot(o1)

To see all parameters associated with box.rectangle, use

trellis.par.get("box.rectangle")

Related


How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to make a plane thicker in RGL?

what for I'll try to make some nice visual illustrations for the binary classification example using the 3D printed data. Here is my 3D plot: require(rgl) #Get example data from mtcars and normalize to range 0:1 fun_norm <- function(k){(k-min(k))/(max(k)-min(k

How to make a plane thicker in RGL?

what for I'll try to make some nice visual illustrations for the binary classification example using the 3D printed data. Here is my 3D plot: require(rgl) #Get example data from mtcars and normalize to range 0:1 fun_norm <- function(k){(k-min(k))/(max(k)-min(k

surfc: how to make contours thicker?

wet lab student I've been reading the documentation and surfcI can't find an option to make the contour thicker, as the contour is shown below the surface. Is there anyway to do this? and Can't really find any documentation on this, but playing around I found

How to make a plane thicker in RGL?

what for I'll try to make some nice visual illustrations for the binary classification example using the 3D printed data. Here is my 3D plot: require(rgl) #Get example data from mtcars and normalize to range 0:1 fun_norm <- function(k){(k-min(k))/(max(k)-min(k

surfc: how to make contours thicker?

wet lab student I've been reading the documentation and surfcI can't find an option to make the contour thicker, as the contour is shown below the surface. Is there anyway to do this? and Can't really find any documentation on this, but playing around I found

How to make bwplot of different vector lengths

Garf Hi, I'm trying to make a bwplot (must be a bwplot from Lattice) to represent the lengths of different vectors. xx1 <- rnorm(20, mean = 3, sd = 3.6) #20 xx2 <- rpois(40, lambda = 3.5) xx3 <- rchisq(31, df = 5, ncp = 0) #31 Mark in the box This will be eas

How to make two lines thicker in Chart JS

Stijn Westerhof: As you can see in the fiddle , I have used Chart JS to make the chart . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line is good. I searched everywhere and tried a

How to make map border thicker in Google Geomap?

Nicholas R. I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map My model is as follows Can we try to make my map look more like a mockup? My code so far is this. <!DOC

How to make two lines thicker in Chart JS

Stijn Westerhof: As you can see in the fiddle , I have used Chart JS to make the chart . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line is good. I searched everywhere and tried a

How to make map border thicker in Google Geomap?

Nicholas R. I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map My model is as follows Can we try to make my map look more like a mockup? My code so far is like this.

How to make the outline of a radio button thicker

Sanjo I'm trying to add something like https://design-system.service.gov.uk/components/radios/ for radio buttons . The problem is that, on the radio button's focus, mine looks like this: enter image description here It should look like this: enter image descri

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev

How to make map border thicker in Google Geomap?

Nicholas R. I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map My model is as follows Can we try to make my map look more like a mockup? My code so far is this. <!DOC

How to make thicker stem lines in Matplolib

Yanping Island Crab I want to make thicker stemming in python when using plt.stem. this is my code import matplotlib.pyplot as plt import numpy as np N = 20 n = np.arange(0, 2*N, 1) x = np.exp(-n/N)*np.exp(1j * 2*np.pi/N*n) plt.stem(n,x.real) plt.show()

How to make the outline of a radio button thicker

Sanjo I'm trying to add something like https://design-system.service.gov.uk/components/radios/ for radio buttons . The problem is that, on the radio button's focus, mine looks like this: enter image description here It should look like this: enter image descri

How to make two lines thicker in Chart JS

Stijn Westerhof As you can see in my fiddle , I have made the chart using Chart JS . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line means it is correct. I searched everywhere and

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev

How to use css to make font thicker then 900

Gianluca I want to make the font extra bold due to the background color of my friend's image in the website header. I found it online, but unfortunately it doesn't work. Is there any other way? h1{ text-shadow: 1px 0 #888888; letter-spacing:1px; font-wei

How to make bars thicker in Kendo UI charts?

sony My graph contains calorie vs time data. Calories have a value every 15 minutes. I want to pull the bar closer. I am posting a sample of the data along with a link to jsFiddle. Also, is it possible to display the entire 24 hours on the graph and only show

How to make two lines thicker in Chart JS

Stijn Westerhof: As you can see in the fiddle , I have used Chart JS to make the chart . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line is good. I searched everywhere and tried a

How to make the outline of a radio button thicker

Sanjo I'm trying to add something like https://design-system.service.gov.uk/components/radios/ for radio buttons . The problem is that, on the radio button's focus, mine looks like this: enter image description here It should look like this: enter image descri

How to make thicker stem lines in Matplolib

Yanping Island Crab I want to make thicker stemming in python when using plt.stem. this is my code import matplotlib.pyplot as plt import numpy as np N = 20 n = np.arange(0, 2*N, 1) x = np.exp(-n/N)*np.exp(1j * 2*np.pi/N*n) plt.stem(n,x.real) plt.show()

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev

How to make map border thicker in Google Geomap?

Nicholas R. I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map My model is as follows Can we try to make my map look more like a mockup? My code so far is this. <!DOC

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev