5

The linewidth of hatching in matplotib plots that take the hatch keyword is very thin. I found some postings from several years ago about this and a claim that a patch was made, but I still cannot figure out a way to increase the linewidth of hatches. Is there a way to do this?

1 Answers1

4

Unfortunately setting the linewidth of a hatch in an Agg backend is not currently possible. The width is hardcoded in the src/_backend_agg.cpp file to be "1.0":

hatch_path_stroke.width(1.0);

The same is true for other backends such as the PDF one, but it might be easier to monkey patch for those cases.

pelson
  • 21,252
  • 4
  • 92
  • 99
  • Thanks -- is there any indication that this will be fixed in future versions? Seems like there's demand for that feature and it wouldn't be that hard to add ... – user1150552 Jul 13 '12 at 20:23
  • That's a much harder question to answer! As far as I am aware, there is no outstanding ticket to get this into matplotlib, but that demand may rise once 1.2 (as yet no release date) makes contour hatching possible. Of course, if you are really keen, you could have a go at parameterising the linewidth yourself and sending in a pull request... :-) – pelson Jul 14 '12 at 13:29