Different scales in y-axes values in stat_pareto plot

269 Views Asked by At

I had generated three stat_pareto plots, from ggQC package, with the following function from ggplot2 package:

require(ggQC)
require(ggplot2)

p3 <- ggplot(t3, aes(x=equip, y=tempo)) +
    stat_pareto(point.color = "red",
                point.size = 3,
                line.color = "black",
                #size.line = 1,
                bars.fill = c("blue", "orange")
    )+
    ggtitle("Turno 3") +
    xlab("Tempo") + ylab("Equipamento")+
    theme(text = element_text(size=10), axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))

Then, I had used the function grid.range from gridExtra package, to plot three Pareto charts on the same figure:

grid.arrange(p1, p2, p3, nrow = 1, top = textGrob("Tempo x Equipamento",gp=gpar(fontsize=20,font=3)))

But the result was not very satisfactory, because I have different scales on the y-axes. Does anyone know how can I plot the three graphs on the same scale?

enter image description here

Data:

> t1
       equip tempo
1  DISP. DIM    11
2  OPEN GATE    42
3     PAINEL    14
4      PINÇA    49
5       ROBO     3
6 T. ROLETES    46
> t2
      equip tempo
1 DISP. DIM    17
2 OPEN GATE    64
3     PINÇA    54
4      ROBO   297
> t3
        equip tempo
1   DISP. DIM     9
2   OPEN GATE   146
3       PINÇA    42
4 DISPOSITIVO     2
0

There are 0 best solutions below