
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 Questions & Answers
- Is it possible to plot implicit equations using 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 control the shape or appearance of the marker with CSS?
- Is it possible to use Python modules in Octave?
- Is it possible to resize an array in C#
- Is it possible to cast in a MongoDB Query?
- Is it possible to create static constructor in java?
- Is it possible to select text boxes with JavaScript?
- Is it possible to hack a phone by Texting?
- How to make colorbar orientation horizontal in Python using Matplotlib?
- HTML5 input type range for vertical orientation possible in Firefox?
- Is it possible to add HTML5 validation to Visual Studio?
- How to change the marker size with pandas.plot() in Matplotlib?
Advertisements