
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
Plot Remote Image from HTTP URL using Matplotlib
To plot a remote image from an http URL, we can use io.imread() method to read an URL and take the following steps −
- Set the figure size and adjust the padding between and around the subplots.
- Load an image from an http URL
- Use imshow() method to display data as an image, i.e., on a 2D regular raster.
- Turn off the axes.
- To display the figure, use show() method.
Example
from skimage import io import matplotlib.pyplot as plt plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True f = "http://matplotlib.sourceforge.net/_static/logo2.png" a = io.imread(f) plt.imshow(a) plt.axis('off') plt.show()
Output
Advertisements