Skip to content

Commit

Permalink
fixed attribute error
Browse files Browse the repository at this point in the history
  • Loading branch information
ronjakrg committed Nov 17, 2024
1 parent ed8fc8f commit ebb73cb
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions protzilla/data_preprocessing/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,17 +411,21 @@ def create_pca_3d_scatter_plot(
y_percent = round(explained_variance_ratio[1], 4) * 100
z_percent = round(explained_variance_ratio[2], 4) * 100

fig.update_layout(template="plotly_protzilla")
fig.update_xaxes(
title=f"Principal Component 1 ({x_percent:.2f} %)",
showticklabels=False
)
fig.update_yaxes(
title=f"Principal Component 2 ({y_percent:.2f} %)",
showticklabels=False
)
fig.update_zaxes(
title=f"Principal Component 3 ({z_percent:.2f} %)",
showticklabels=False
fig.update_layout(
template="plotly_protzilla",
scene={
"xaxis": {
"title": f"Principal Component 1 ({x_percent:.2f} %)",
"showticklabels": False
},
"yaxis": {
"title": f"Principal Component 2 ({y_percent:.2f} %)",
"showticklabels": False
},
"zaxis": {
"title": f"Principal Component 3 ({z_percent:.2f} %)",
"showticklabels": False
}
}
)
return fig

0 comments on commit ebb73cb

Please sign in to comment.