- 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 maximize plt.show() using Python on Mac?
To maximize plt.show() using Python on Mac, we can use full_screen_toggle().
Steps
- Set the figure size and adjust the padding between and around the subplots.
- Add a subplot to the current figure.
- Make a piechart with input list.
- Get the Figure Manager of the current figure.
- Use full_screen_toggle() to create a full-screen pop-up window.
- To display the figure, use show() method.
Example
import matplotlib.pyplot as plt plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True plt.subplot(1, 1, 1) plt.pie([1, 2, 3]) mng = plt.get_current_fig_manager() mng.full_screen_toggle() plt.show()
Output
- Related Articles
- How to Extracting MAC address using Python?
- How to set your python path on Mac?
- How to install libxml2 with python modules on Mac?
- How to set python environment variable PYTHONPATH on Mac?
- How to maximize a plt.show() window using Python?
- Installing Python on Mac OS
- How to Maximize window in chrome using webDriver (Python)?
- How to install Git On Mac?
- Extracting MAC address using Python
- How to install NumPy for Python 3.3.5 on Mac OSX 10.9?
- Post favourite stuffs using pixelpumper on mac
- How to install Selenium WebDriver on Mac OS?
- Using the Selenium WebDriver - Unable to launch chrome browser on Mac
- How to install Matplotlib on Mac 10.7 in virtualenv?
- How to compile and execute C# programs on Mac OS?

Advertisements