First time here? Check out the FAQ!

Ask Your Question
1

Image.PNG definition degraded, in notebook view

asked 6 years ago

ortollj gravatar image

Hi is there a way to improve the definition in Jupyter notebook ?

from PIL import Image
img=Image.open("C:\\Users\\jean-pierre\\Documents\\SageMath\\IPYNB\\"+"Satellites.png")
matrix_plot(img, origin='upper',aspect_ratio=1)

image description

what I see in notebook is very poor in notebook !

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 6 years ago

ortollj gravatar image

it 's ok !, searching on the web, I found :matplotlib.org I use this code:

import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
img = mpimg.imread("C:\\Users\\jean-pierre\\Documents\\SageMath\\IPYNB\\"+"Satellites.png")
imgplot = plt.imshow(img)

the definition is ok with this code

Preview: (hide)
link

Comments

change figure size

from matplotlib.pyplot import figure
figure(num=None, figsize=(20, 10), dpi=100, facecolor='w', edgecolor='k')
ortollj gravatar imageortollj ( 6 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 6 years ago

Seen: 498 times

Last updated: Dec 19 '18