1

I am trying to thicken the lines of my plot with geom_pointrange.

ggplot( data, aes(x = xvar, ymin = ymin, y = yvar, ymax = ymax))+  
  geom_pointrange(shape = 21, size = 1.5, fatten = 0.75, 
                  position = position_dodge(width = 0.5), color = "#5a2c76")

I've tried playing with the fatten and size variables as well as adding linewidth, width, etc. all over the code. The widths of the lines don't change.

Rui Barradas
  • 70,273
  • 8
  • 34
  • 66
Thornwell
  • 11
  • 1
  • Not reproducible. `ggplot( diamonds, aes(x = carat, y = price)) + geom_pointrange(fatten = 9, ymin=0, ymax=1000)` (changing values of `fatten`) has the expected behaviour for me. You maximise your chance of getting a useful answer if you provide a minimal reproducible example. [This post](https://stackoverflow.com/help/minimal-reproducible-example) may help. – Limey Jan 02 '23 at 14:17
  • Does this example work? `ggplot() + geom_pointrange(aes(x = 1, ymin = 1, y = 2, ymax = 3), linewidth = 4)`. If so, there's perhaps a typo in your code which exits the `ggplot` call before redrawing with the desired linewidth. – I_O Jan 02 '23 at 14:24
  • @I_O, this works as intended, but fails when I place the aes in the ggplot statement. I should be able to work around this by calling the aes into the pointrange statement instead of the ggplot though. Thank you – Thornwell Jan 02 '23 at 14:33

0 Answers0