虽然有很多关于在ggplot2中向条形图添加误差条的帖子,当y轴是连续变量而x轴是离散类别时,我试图将误差条添加到条形图中,其中y-轴是离散的。更具体地说,y轴是我的数据中x轴上指定标称组的观察计数。
例如,假设我有以下情节:
CREATE TABLE `randomgame` (
`nomejogo` varchar(100) NOT NULL,
PRIMARY KEY (`nomejogo`)
) ENGINE=InnoDB;
create table `estilos` (
`codestilo` int(100) NOT NULL ,
`estilo` varchar(100) NOT NULL,
PRIMARY KEY (`estilo`)
) ENGINE=InnoDB;
Create table `gameEstilos`(
`nomejogo` varchar(100) NOT NULL,
`estilo` varchar(100) NOT NULL,
primary key(`nomejogo`,`estilo`),
FOREIGN KEY (`nomejogo`) REFERENCES `randomgame` ( `nomejogo` ) ON UPDATE NO ACTION ON DELETE CASCADE,
FOREIGN KEY ( `estilo` ) REFERENCES `estilos` ( `estilo` ) ON UPDATE NO ACTION ON DELETE CASCADE
) ENGINE=InnoDB;
如何为计数添加错误栏?