“eliminar las garrapatas matplotlib” Código de respuesta

eliminar las garrapatas matplotlib

plt.axis('off')
Bored Coder

matplotlib elimina las garrapatas y las líneas

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot([1],[1])
ax.tick_params(axis=u'both', which=u'both',length=0)
plt.show()
Busy Boar

Matplotlib apagar las garrapatas

from matplotlib import pyplot as plt
plt.plot(range(10))
plt.tick_params(
    axis='x',          # changes apply to the x-axis
    which='both',      # both major and minor ticks are affected
    bottom=False,      # ticks along the bottom edge are off
    top=False,         # ticks along the top edge are off
    labelbottom=False) # labels along the bottom edge are off
plt.show()
plt.savefig('plot')
plt.clf()
Real Raccoon

Cómo ocultar las marcas en matplotlib

import matplotlib.pyplot as plt
import numpy as np

# Simple data to display in various forms
x = np.linspace(0, 2 * np.pi, 400)
y = np.sin(x ** 2)

fig, axarr = plt.subplots(2, 2)
fig.suptitle("This Main Title is Nicely Formatted", fontsize=16)

axarr[0, 0].plot(x, y)
axarr[0, 0].set_title('Axis [0,0] Subtitle')
axarr[0, 1].scatter(x, y)
axarr[0, 1].set_title('Axis [0,1] Subtitle')
axarr[1, 0].plot(x, y ** 2)
axarr[1, 0].set_title('Axis [1,0] Subtitle')
axarr[1, 1].scatter(x, y ** 2)
axarr[1, 1].set_title('Axis [1,1] Subtitle')

# Fine-tune figure;
# hide x ticks for top plots and y ticks for right plots

plt.setp([a.get_xticklabels() for a in axarr[0, :]], visible=False)
plt.setp([a.get_yticklabels() for a in axarr[:, 1]], visible=False)


# Tight layout often produces nice results
# but requires the title to be spaced accordingly

fig.tight_layout()
fig.subplots_adjust(top=0.88)

plt.show()


Mckynde

Respuestas similares a “eliminar las garrapatas matplotlib”

Preguntas similares a “eliminar las garrapatas matplotlib”

Más respuestas relacionadas con “eliminar las garrapatas matplotlib” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código