Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

275
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda