- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
Is it possible to control Matplotlib marker orientation?
To control matplotlib marker orientation, we can use marker tuple that contains a number of sides, style and rotation or orientation of the marker.
Steps
Set the figure size and adjust the padding between and around the subplots.
Create x and y data points using numpy.
Make an array of 10 different rotations.
Zip x, y and i. Iterate them and plot the points using plot() method with marker tuple.
To display the figure, use show() method.
Example
import numpy as np from matplotlib import pyplot as plt plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True x = np.random.rand(10) y = np.random.rand(10) i = np.linspace(0, 10, 10) for x, y, i in zip(x, y, i): plt.plot(x, y, marker=(3, 0, i*45), linestyle='None', markersize=20) plt.show()
Output
- Related Articles
- Is it possible to plot implicit equations using Matplotlib?
- How to control the shape or appearance of the marker with CSS?
- How to make colorbar orientation horizontal in Python using Matplotlib?
- How to use Font Awesome symbol as marker in matplotlib?
- How to change the marker size with pandas.plot() in Matplotlib?
- How to set legend marker size and alpha in Matplotlib?
- HTML5 input type range for vertical orientation possible in Firefox?
- How to plot two dotted lines and set marker using Matplotlib?
- How to use a custom png image marker in a plot (Matplotlib)?
- How to plot scatter points with increasing size of marker in Matplotlib?
- Tweaking axis labels and names orientation for 3D plots in Matplotlib
- Is it possible to style HTML5 audio tag?
- Is it possible to use MongoDB capped collection?
- Is it possible to use pyplot without DISPLAY?
- How to remove the outline of a circle marker when using pyplot.plot in Matplotlib?

Advertisements