“Matplotlib Matshow Log Escala” Código de respuesta

escala de registro del eje matplotlib y

import pylab
import matplotlib.pyplot as plt
a = [pow(10, i) for i in range(10)]
fig = plt.figure()
ax = fig.add_subplot(2, 1, 1)

line, = ax.plot(a, color='blue', lw=2)

ax.set_yscale('log')

pylab.show()
Horrible Hippopotamus

Matplotlib Matshow Log Escala

from pylab import figure, cm
from matplotlib.colors import LogNorm

# C = some matrix
f = figure(figsize=(6.2, 5.6))
ax = f.add_axes([0.17, 0.02, 0.72, 0.79])
axcolor = f.add_axes([0.90, 0.02, 0.03, 0.79])

im = ax.matshow(C, cmap=cm.gray_r, norm=LogNorm(vmin=0.01, vmax=1))

t = [0.01, 0.1, 0.2, 0.4, 0.6, 0.8, 1.0]
f.colorbar(im, cax=axcolor, ticks=t, format="$%.2f$")

f.show()
bougui

Respuestas similares a “Matplotlib Matshow Log Escala”

Preguntas similares a “Matplotlib Matshow Log Escala”

Más respuestas relacionadas con “Matplotlib Matshow Log Escala” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código