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).
fig.update_layout({ax:{"visible":False, "matches":None} for ax in fig.to_dict()["layout"] if "axis" in ax})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})
px.scatter_matrix(df).update_layout({ax:{"tickmode":"array","tickvals":[]} for ax in fig.to_dict()["layout"] if "axis" in ax})