- 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 to use unicode symbols in matplotlib?
To use unicode symbols in matplotlib, we can take the following steps.
Steps
Set the figure size and adjust the padding between and around the subplots.
Add text to figure, using text() method with unicode symbols. Here we have used the Unicode chararacter (Δ) which has the character code (0394).
To display the figure, use Show() method.
Example
import matplotlib.pyplot as plt # Set the figure size plt.rcParams["figure.figsize"] = [7.00, 3.50] plt.rcParams["figure.autolayout"] = True # Unicode symbol plt.text(0.5, 0.5, s=u"\u0394", fontsize=50) # Display the plot plt.show()
Output
It will produce the following output −
Now, let's use another Unicode character (\u2734).
It will produce the following output −
- Related Articles
- How to use unicode () in Android sqlite?
- How to use Unicode and Special Characters in Tkinter?
- How to place customized legend symbols on a plot using Matplotlib?
- How to use ax.get_ylim() in matplotlib?
- Plotting scatter points with clover symbols in Matplotlib
- How to use pyplot.arrow or patches.Arrow in matplotlib?
- How to print Unicode character in C++?
- How to use Matplotlib to plot PySpark SQL results?
- How to use Font Awesome symbol as marker in matplotlib?
- How to convert Unicode values to characters in JavaScript?
- How to force the Y axis to use only integers in Matplotlib?
- How to use multiple font sizes in one label in Python Matplotlib?
- How to use an update function to animate a NetworkX graph in Matplotlib?
- How to use a custom png image marker in a plot (Matplotlib)?
- How to convert an integer to a unicode character in Python?

Advertisements