My objective is to draw a graph with 4 quadrants and plot points in the same. And also, how can I divide a quadrant into several sectors? How can I do the same in matplotlib: a graph/plot with 4 quadrants. With x axis (1-9) and y-axis(1-9)?
From the question, it sounds like you want a single graph with several delineated regions with a specific xy range. This is pretty straightforward to do. You can always just draw lines on the plot to delineate the regions of interest. Here is a quick example based on your stated objectives:
import matplotlib.pyplot as plt
plt.figure()
# Set x-axis range
plt.xlim((1,9))
# Set y-axis range
plt.ylim((1,9))
# Draw lines to split quadrants
plt.plot([5,5],[1,9], linewidth=4, color='red' )
plt.plot([1,9],[5,5], linewidth=4, color='red' )
plt.title('Quadrant plot')
# Draw some sub-regions in upper left quadrant
plt.plot([3,3],[5,9], linewidth=2, color='blue')
plt.plot([1,5],[7,7], linewidth=2, color='blue')
plt.show()

I would take a look at the AxesGrid toolkit:
http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/index.html
Perhaps the middle image at the top of this page is something along the lines of what you are looking for. There are examples on the following page in the API documentation that should be a good starting point:
http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html
Without an example of what you want to do exactly it is difficult to give you the best advice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With