Articles on Trending Technologies

Technical articles with clear explanations and examples

How to maximize a plt.show() window using Python?

Rishikesh Kumar Rishi
Rishikesh Kumar Rishi
Updated on 25-Mar-2026 6K+ Views

To maximize a matplotlib plot window, you can use the figure manager's built-in methods. The most common approach is using plt.get_current_fig_manager() along with full_screen_toggle() or window.state() methods. Method 1: Using full_screen_toggle() This method toggles the window to full screen mode ? import matplotlib.pyplot as plt plt.subplot(1, 1, 1) plt.pie([1, 2, 3], labels=['A', 'B', 'C']) plt.title('Sample Pie Chart') mng = plt.get_current_fig_manager() mng.full_screen_toggle() plt.show() Method 2: Using window.state() (Tkinter backend) For Tkinter backend, you can maximize the window using the state method ? import matplotlib.pyplot as plt plt.subplot(1, 1, 1) ...

Read More

How to make two plots side-by-side using Python?

Rishikesh Kumar Rishi
Rishikesh Kumar Rishi
Updated on 25-Mar-2026 32K+ Views

When creating data visualizations, you often need to display multiple plots side-by-side for comparison. Python's Matplotlib provides the subplot() method to divide a figure into multiple sections and place plots in specific positions. Using plt.subplot() Method The subplot(nrows, ncols, index) method splits a figure into a grid of nrows × ncols sections. The index parameter specifies which section to use for the current plot ? from matplotlib import pyplot as plt import numpy as np # Create sample data x_points = np.array([2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) y1_points = np.array([12, 14, ...

Read More

Saving images in Python at a very high quality

Rishikesh Kumar Rishi
Rishikesh Kumar Rishi
Updated on 25-Mar-2026 9K+ Views

To save images in Python with very high quality, you need to control the image format and resolution. The most effective approach is using matplotlib's savefig() method with optimized parameters. Steps for High-Quality Image Saving Create fig and ax variables using subplots() method, where default nrows and ncols are 1. Plot the data using plot() method. Add axes labels using ylabel() and xlabel(). Use vector formats like .eps, .pdf, or .svg for scalable quality. Increase the DPI (dots per inch) value for ...

Read More

Python program to remove duplicate elements from a Circular Linked List

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 523 Views

When it is required to remove duplicates from a circular linked list, a Node class needs to be created. In this class, there are two attributes: the data that is present in the node, and the access to the next node of the linked list. In a circular linked list, the head and the rear are adjacent to each other. They are connected to form a circle, and don't have NULL value in the last node. Another class needs to be created that would have an initialization function, and the head of the node would be initialized to ...

Read More

Python program to insert a new node at the middle of the Circular Linked List

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 476 Views

When it is required to insert a new node at the middle of the circular linked list, a Node class needs to be created. In this class, there are two attributes: the data that is present in the node, and the access to the next node of the linked list. In a circular linked list, the head and the rear are adjacent to each other. They are connected to form a circle, and don't have 'NULL' value in the last node. Instead, the last node points back to the first node. Node Class Structure The Node class ...

Read More

Python program to insert a new node at the end of the Circular Linked List

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 589 Views

When it is required to insert a new node at the end of the circular linked list, a Node class needs to be created. In this class, there are two attributes: the data that is present in the node, and the access to the next node of the linked list. In a circular linked list, the head and the tail are adjacent to each other. They are connected to form a circle, and don't have NULL value in the last node. Instead, the last node points back to the first node. ...

Read More

Python program to insert a new node at the beginning of the Circular Linked List

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 729 Views

When it is required to insert a new node at the beginning of a circular linked list, a 'Node' class needs to be created. In this class, there are two attributes, the data that is present in the node, and the access to the next node of the linked list. In a circular linked list, the head and the rear are adjacent to each other. They are connected to form a circle, and don't have 'NULL' value in the last node. Instead, the last node points back to the first node. Node Class Structure First, we create ...

Read More

Python program to find the maximum and minimum value node from a circular linked list

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 457 Views

When it is required to find the maximum and minimum node values from a circular linked list, a Node class needs to be created. In this class, there are two attributes: the data present in the node, and the access to the next node of the linked list. In a circular linked list, the head and the tail are adjacent to each other. They are connected to form a circle, and don't have None value in the last node − instead, the last node points back to the first node. Implementation The implementation involves creating a Node ...

Read More

Python program to delete a node from the middle of the Circular Linked List

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 329 Views

When it is required to delete a node from the middle of the circular linked list, a Node class needs to be created. In this class, there are two attributes: the data that is present in the node, and the access to the next node of the linked list. In a circular linked list, the head and the rear are adjacent to each other. They are connected to form a circle, and don't have NULL value in the last node. Another class needs to be created that would have an initialization function, and the head of the node ...

Read More

Python program to delete a node from the end of the Circular Linked List

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 490 Views

When it is required to delete a node from the end of a circular linked list, a Node class needs to be created. In this class, there are two attributes: the data that is present in the node, and the access to the next node of the linked list. In a circular linked list, the head and the tail are adjacent to each other. They are connected to form a circle, and don't have NULL value in the last node − instead, the last node points back to the first node. Node Class Structure The Node class ...

Read More
Showing 5171–5180 of 61,299 articles
« Prev 1 516 517 518 519 520 6130 Next »
Advertisements