pysal / pointpats

Planar Point Pattern Analysis in PySAL
https://pysal.org/pointpats/
BSD 3-Clause "New" or "Revised" License
83 stars 27 forks source link

Modifying QStatistic.plot() output #143

Open rheag91 opened 1 month ago

rheag91 commented 1 month ago

Hello, I am trying to figure out how to modify the output of QStatistic.plot() (which outputs a quadrat plot); specifically, I need to change the dimensions of the plot and increase the resolution. I've attached a picture of what I'm getting right now. Ideally I would like to connect the plot to a matplotlib subplot where I can control all these features, but I cannot figure out how to do that from the documentation for PointPats; it seems to be possible for PointPattern.plot() but those methods don't seem to work for QStatistic.plot(). Would appreciate any help with this!

Thanks!

image

martinfleis commented 1 month ago

I admit that it is not optimal now but you may make a use of the fact that plot() returns matplotlib axis object. So you may be able to adapt it afterwards, using set_aspect and similar matplotlib methods. These methods would need to be refactor a bit to allow plotting on custom axes (which would be certainly desirable!) within a subplot.