@@ -98,7 +98,7 @@ def __is_code_language_available(self) -> bool:
9898 def __get_projection_language (self ) -> str :
9999 return self .query_parameters_ ["projection_language" ] if self .__is_code_language_available () else ""
100100
101- def get_plot_prefix (self ) -> str :
101+ def get_title_prefix (self ) -> str :
102102 if self .__is_code_language_available ():
103103 return self .__get_projection_language () + " " + self .__get_projection_node_label ()
104104 return self .__get_projection_node_label ()
@@ -815,7 +815,7 @@ def get_common_plot_parameters(data: pd.DataFrame) -> dict:
815815# ------------------------------------------------------------------------------------------------------------
816816
817817parameters = parse_input_parameters ()
818- plot_prefix = parameters .get_plot_prefix ()
818+ title_prefix = parameters .get_title_prefix ()
819819report_directory = parameters .get_report_directory ()
820820
821821driver = get_graph_database_driver ()
@@ -828,21 +828,21 @@ def get_common_plot_parameters(data: pd.DataFrame) -> dict:
828828 data ['pageRank' ],
829829 data ['articleRank' ],
830830 data ['shortCodeUnitName' ],
831- title = f"{ plot_prefix } distribution of PageRank - ArticleRank differences" ,
832- plot_file_path = get_file_path (f" { plot_prefix } _PageRank_Minus_ArticleRank_Distribution " , parameters )
831+ title = f"{ title_prefix } distribution of PageRank - ArticleRank differences" ,
832+ plot_file_path = get_file_path ("PageRank_Minus_ArticleRank_Distribution " , parameters )
833833)
834834
835835plot_feature_distribution (
836836 feature_values = data ['clusteringCoefficient' ],
837837 feature_name = 'Clustering Coefficient' ,
838- title = f"{ plot_prefix } clustering coefficient distribution" ,
838+ title = f"{ title_prefix } clustering coefficient distribution" ,
839839 plot_file_path = get_file_path ("ClusteringCoefficient_distribution" , parameters )
840840)
841841
842842plot_feature_distribution (
843843 feature_values = data ['betweenness' ],
844844 feature_name = 'Betweenness' ,
845- title = f"{ plot_prefix } betweenness centrality distribution" ,
845+ title = f"{ title_prefix } betweenness centrality distribution" ,
846846 plot_file_path = get_file_path ("BetweennessCentrality_distribution" , parameters )
847847)
848848
@@ -851,15 +851,15 @@ def get_common_plot_parameters(data: pd.DataFrame) -> dict:
851851 data ['pageRank' ],
852852 data ['shortCodeUnitName' ],
853853 data ['clusterNoise' ],
854- title = f"{ plot_prefix } clustering coefficient versus PageRank" ,
855- plot_file_path = get_file_path (f" { plot_prefix } _ClusteringCoefficient_versus_PageRank " , parameters )
854+ title = f"{ title_prefix } clustering coefficient versus PageRank" ,
855+ plot_file_path = get_file_path ("ClusteringCoefficient_versus_PageRank " , parameters )
856856)
857857
858858if (overall_cluster_count < 20 ):
859859 print (f"anomalyDetectionFeaturePlots: Less than 20 clusters: { overall_cluster_count } . Only one plot containing all clusters will be created." )
860860 plot_clusters (
861861 clustering_visualization_dataframe = data ,
862- title = f"{ plot_prefix } all clusters overall" ,
862+ title = f"{ title_prefix } all clusters overall" ,
863863 plot_file_path = get_file_path ("Clusters_Overall" , parameters )
864864 )
865865else :
@@ -869,57 +869,57 @@ def get_common_plot_parameters(data: pd.DataFrame) -> dict:
869869 )
870870 plot_clusters (
871871 clustering_visualization_dataframe = clusters_by_largest_size ,
872- title = f"{ plot_prefix } clusters with the largest size" ,
873- plot_file_path = get_file_path (f" { plot_prefix } _Clusters_largest_size " , parameters )
872+ title = f"{ title_prefix } clusters with the largest size" ,
873+ plot_file_path = get_file_path ("Clusters_largest_size " , parameters )
874874 )
875875
876876 clusters_by_largest_max_radius = get_clusters_by_criteria (
877877 data , by = 'clusterRadiusMax' , ascending = False , cluster_count = 20
878878 )
879879 plot_clusters (
880880 clustering_visualization_dataframe = clusters_by_largest_max_radius ,
881- title = f"{ plot_prefix } clusters with the largest max radius" ,
882- plot_file_path = get_file_path (f" { plot_prefix } _Clusters_largest_max_radius " , parameters )
881+ title = f"{ title_prefix } clusters with the largest max radius" ,
882+ plot_file_path = get_file_path ("Clusters_largest_max_radius " , parameters )
883883 )
884884
885885 clusters_by_largest_average_radius = get_clusters_by_criteria (
886886 data , by = 'clusterRadiusAverage' , ascending = False , cluster_count = 20
887887 )
888888 plot_clusters (
889889 clustering_visualization_dataframe = clusters_by_largest_average_radius ,
890- title = f"{ plot_prefix } clusters with the largest average radius" ,
891- plot_file_path = get_file_path (f" { plot_prefix } _Clusters_largest_average_radius " , parameters )
890+ title = f"{ title_prefix } clusters with the largest average radius" ,
891+ plot_file_path = get_file_path ("Clusters_largest_average_radius " , parameters )
892892 )
893893
894894plot_clusters_probabilities (
895895 clustering_visualization_dataframe = data ,
896- title = f"{ plot_prefix } clustering probabilities (red=high uncertainty)" ,
897- plot_file_path = get_file_path (f" { plot_prefix } _Cluster_probabilities " , parameters )
896+ title = f"{ title_prefix } clustering probabilities (red=high uncertainty)" ,
897+ plot_file_path = get_file_path ("Cluster_probabilities " , parameters )
898898)
899899
900900plot_cluster_noise (
901901 clustering_visualization_dataframe = data ,
902- title = f"{ plot_prefix } clustering noise points that are surprisingly central (red) or popular (size)" ,
902+ title = f"{ title_prefix } clustering noise points that are surprisingly central (red) or popular (size)" ,
903903 size_column_name = 'degree' ,
904904 color_column_name = 'pageRank' ,
905- plot_file_path = get_file_path (f" { plot_prefix } _ClusterNoise_highly_central_and_popular " , parameters )
905+ plot_file_path = get_file_path ("ClusterNoise_highly_central_and_popular " , parameters )
906906)
907907
908908plot_cluster_noise (
909909 clustering_visualization_dataframe = data ,
910- title = f"{ plot_prefix } clustering noise points that bridge flow (red) and are poorly integrated (size)" ,
910+ title = f"{ title_prefix } clustering noise points that bridge flow (red) and are poorly integrated (size)" ,
911911 size_column_name = 'inverseClusteringCoefficient' ,
912912 color_column_name = 'betweenness' ,
913- plot_file_path = get_file_path (f" { plot_prefix } _ClusterNoise_poorly_integrated_bridges " , parameters ),
913+ plot_file_path = get_file_path ("ClusterNoise_poorly_integrated_bridges " , parameters ),
914914 downscale_normal_sizes = 0.4
915915)
916916
917917plot_cluster_noise (
918918 clustering_visualization_dataframe = data ,
919- title = f"{ plot_prefix } clustering noise points with role inversion (size) possibly violating layering or dependency direction (red)" ,
919+ title = f"{ title_prefix } clustering noise points with role inversion (size) possibly violating layering or dependency direction (red)" ,
920920 size_column_name = 'pageToArticleRankDifference' ,
921921 color_column_name = 'betweenness' ,
922- plot_file_path = get_file_path (f" { plot_prefix } _ClusterNoise_role_inverted_bridges " , parameters )
922+ plot_file_path = get_file_path ("ClusterNoise_role_inverted_bridges " , parameters )
923923)
924924
925925driver .close ()
0 commit comments