- 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 to change the marker size with pandas.plot() in Matplotlib?
To change the marker size with pandas.plot(), we can take the following steps −
- Set the figure size and adjust the padding between and around the subplots.
- Create a Pandas dataframe with three columns, col1, col2 and col3.
- Use pandas.plot() with marker="*" and markersize=15.
- To display the figure, use show() method.
Example
import matplotlib.pyplot as plt import pandas as pd plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True df = pd.DataFrame([[2, 1, 4], [5, 2, 1], [4, 0, 1]], columns=['col1', 'col2', 'col3']) df.plot(marker="*", markersize=15) plt.show()
Output
Advertisements