Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

270
Vistas
How to remove the axes tick marks in plots from plotly?

Scatterplot using plotly How do I format this better? I create unordered pairs from list of columns and plotting them iteratively. I havent managed to remove the axis tick labels. Any suggestions on howto format this better so that I display it in front end?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

I suppose you are using plt.subplots(x, y) here. To remove axes (including there text) completely, you can use subplot[x, y].axis('off').
Alternatively, you could add more space in between the plots with plt.margins(x_y_margin) or plt.margins(x_margin, y_margin).

A little bit offtopic: I wouldn't use scatter plots for visualization of classes (like in the plot 2nd row 3rd column).

about 4 years ago · Juan Pablo Isaza Denunciar

0

  • you have not indicated how you are building the sub-plots
  • you can make all axis invisible with fig.update_layout({ax:{"visible":False, "matches":None} for ax in fig.to_dict()["layout"] if "axis" in ax})
  • full example code:
import numpy as np
import pandas as pd
import plotly.express as px

L = 100
df = pd.DataFrame(
    {
        "lin": np.linspace(0, 100, L),
        "cos": np.cos(np.linspace(0, np.pi, L)),
        "sin": np.sin(np.linspace(0, np.pi, L)),
        "tan": np.tan(np.linspace(0, np.pi, L)),
        "char": np.random.choice(list("ABCDEF"), L),
        "rand": np.random.uniform(1,50, L)
    }
)

fig = px.scatter(
    df.stack().reset_index(), x="level_0", y=0, facet_col="level_1", facet_col_wrap=3
)
fig.update_layout({ax:{"visible":False, "matches":None} for ax in fig.to_dict()["layout"] if "axis" in ax})
  • matrix of all columns against all columns. Hide tick marks
px.scatter_matrix(df).update_layout({ax:{"tickmode":"array","tickvals":[]} for ax in fig.to_dict()["layout"] if "axis" in ax})
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda