- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How I can get a Cartesian coordinate system in Matplotlib?
To plot a Cartesian coordinate system in matplotlib, we can take the following Steps −
- Initialize a variable (N) with a value.
- Create random data points for x and y.
- Plot the points using scatter method with x and y data points.
- To display the figure, use show() method.
Example
import numpy as np import matplotlib.pyplot as plt plt.rcParams["figure.figsize"] = [7.00, 3.50] plt.rcParams["figure.autolayout"] = True N = 50 x = np.random.rand(N) y = np.random.rand(N) plt.scatter(x, y) plt.show()
Output
- Related Articles
- How can I get the color of the last figure in Matplotlib?
- How can I get pyplot images to show on a console app? (Matplotlib)
- How can I get the output of a Matplotlib plot as an SVG?
- Showing points coordinate in a plot in Python Matplotlib
- How can I get the length of a single unit on an axis in Matplotlib?
- How can I plot a confusion matrix in matplotlib?
- How can I plot a single point in Matplotlib Python?
- How can I programmatically select a specific subplot in Matplotlib?
- How can I place a table on a plot in Matplotlib?
- How can I show figures separately in Matplotlib?
- How can I plot hysteresis threshold in Matplotlib?
- How do I get all the bars in a Matplotlib bar chart?
- How can I convert numbers to a color scale in Matplotlib?
- How can I get a random number in Kotlin?
- How can I draw inline line labels in Matplotlib?

Advertisements