@@ -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 ()
@@ -812,7 +812,7 @@ def get_common_plot_parameters(data: pd.DataFrame) -> dict:
812812# ------------------------------------------------------------------------------------------------------------
813813
814814parameters = parse_input_parameters ()
815- plot_prefix = parameters .get_plot_prefix ()
815+ title_prefix = parameters .get_title_prefix ()
816816report_directory = parameters .get_report_directory ()
817817
818818driver = get_graph_database_driver ()
@@ -825,31 +825,31 @@ def get_common_plot_parameters(data: pd.DataFrame) -> dict:
825825 data ['pageRank' ],
826826 data ['articleRank' ],
827827 data ['shortCodeUnitName' ],
828- title = f"{ plot_prefix } distribution of PageRank - ArticleRank differences" ,
829- plot_file_path = get_file_path (f" { plot_prefix } _PageRank_Minus_ArticleRank_Distribution " , parameters )
828+ title = f"{ title_prefix } distribution of PageRank - ArticleRank differences" ,
829+ plot_file_path = get_file_path ("PageRank_Minus_ArticleRank_Distribution " , parameters )
830830)
831831
832832plot_clustering_coefficient_distribution (
833833 data ['clusteringCoefficient' ],
834- title = f"{ plot_prefix } distribution of clustering coefficients" ,
835- plot_file_path = get_file_path (f" { plot_prefix } _ClusteringCoefficient_distribution " , parameters )
834+ title = f"{ title_prefix } distribution of clustering coefficients" ,
835+ plot_file_path = get_file_path ("ClusteringCoefficient_distribution " , parameters )
836836)
837837
838838plot_clustering_coefficient_vs_page_rank (
839839 data ['clusteringCoefficient' ],
840840 data ['pageRank' ],
841841 data ['shortCodeUnitName' ],
842842 data ['clusterNoise' ],
843- title = f"{ plot_prefix } clustering coefficient versus PageRank" ,
844- plot_file_path = get_file_path (f" { plot_prefix } _ClusteringCoefficient_versus_PageRank " , parameters )
843+ title = f"{ title_prefix } clustering coefficient versus PageRank" ,
844+ plot_file_path = get_file_path ("ClusteringCoefficient_versus_PageRank " , parameters )
845845)
846846
847847if (overall_cluster_count < 20 ):
848848 print (f"anomalyDetectionFeaturePlots: Less than 20 clusters: { overall_cluster_count } . Only one plot containing all clusters will be created." )
849849 plot_clusters (
850850 clustering_visualization_dataframe = data ,
851- title = f"{ plot_prefix } all clusters overall (less than 20)" ,
852- plot_file_path = get_file_path (f" { plot_prefix } _Clusters_Overall " , parameters )
851+ title = f"{ title_prefix } all clusters overall (less than 20)" ,
852+ plot_file_path = get_file_path ("Clusters_Overall " , parameters )
853853 )
854854else :
855855 print (f"anomalyDetectionFeaturePlots: More than 20 clusters: { overall_cluster_count } . Different plots focussing on different features like cluster size will be created." )
@@ -858,57 +858,57 @@ def get_common_plot_parameters(data: pd.DataFrame) -> dict:
858858 )
859859 plot_clusters (
860860 clustering_visualization_dataframe = clusters_by_largest_size ,
861- title = f"{ plot_prefix } clusters with the largest size" ,
862- plot_file_path = get_file_path (f" { plot_prefix } _Clusters_largest_size " , parameters )
861+ title = f"{ title_prefix } clusters with the largest size" ,
862+ plot_file_path = get_file_path ("Clusters_largest_size " , parameters )
863863 )
864864
865865 clusters_by_largest_max_radius = get_clusters_by_criteria (
866866 data , by = 'clusterRadiusMax' , ascending = False , cluster_count = 20
867867 )
868868 plot_clusters (
869869 clustering_visualization_dataframe = clusters_by_largest_max_radius ,
870- title = f"{ plot_prefix } clusters with the largest max radius" ,
871- plot_file_path = get_file_path (f" { plot_prefix } _Clusters_largest_max_radius " , parameters )
870+ title = f"{ title_prefix } clusters with the largest max radius" ,
871+ plot_file_path = get_file_path ("Clusters_largest_max_radius " , parameters )
872872 )
873873
874874 clusters_by_largest_average_radius = get_clusters_by_criteria (
875875 data , by = 'clusterRadiusAverage' , ascending = False , cluster_count = 20
876876 )
877877 plot_clusters (
878878 clustering_visualization_dataframe = clusters_by_largest_average_radius ,
879- title = f"{ plot_prefix } clusters with the largest average radius" ,
880- plot_file_path = get_file_path (f" { plot_prefix } _Clusters_largest_average_radius " , parameters )
879+ title = f"{ title_prefix } clusters with the largest average radius" ,
880+ plot_file_path = get_file_path ("Clusters_largest_average_radius " , parameters )
881881 )
882882
883883plot_clusters_probabilities (
884884 clustering_visualization_dataframe = data ,
885- title = f"{ plot_prefix } clustering probabilities (red=high uncertainty)" ,
886- plot_file_path = get_file_path (f" { plot_prefix } _Cluster_probabilities " , parameters )
885+ title = f"{ title_prefix } clustering probabilities (red=high uncertainty)" ,
886+ plot_file_path = get_file_path ("Cluster_probabilities " , parameters )
887887)
888888
889889plot_cluster_noise (
890890 clustering_visualization_dataframe = data ,
891- title = f"{ plot_prefix } clustering noise points that are surprisingly central (red) or popular (size)" ,
891+ title = f"{ title_prefix } clustering noise points that are surprisingly central (red) or popular (size)" ,
892892 size_column_name = 'degree' ,
893893 color_column_name = 'pageRank' ,
894- plot_file_path = get_file_path (f" { plot_prefix } _ClusterNoise_highly_central_and_popular " , parameters )
894+ plot_file_path = get_file_path ("ClusterNoise_highly_central_and_popular " , parameters )
895895)
896896
897897plot_cluster_noise (
898898 clustering_visualization_dataframe = data ,
899- title = f"{ plot_prefix } clustering noise points that bridge flow (red) and are poorly integrated (size)" ,
899+ title = f"{ title_prefix } clustering noise points that bridge flow (red) and are poorly integrated (size)" ,
900900 size_column_name = 'inverseClusteringCoefficient' ,
901901 color_column_name = 'betweenness' ,
902- plot_file_path = get_file_path (f" { plot_prefix } _ClusterNoise_poorly_integrated_bridges " , parameters ),
902+ plot_file_path = get_file_path ("ClusterNoise_poorly_integrated_bridges " , parameters ),
903903 downscale_normal_sizes = 0.4
904904)
905905
906906plot_cluster_noise (
907907 clustering_visualization_dataframe = data ,
908- title = f"{ plot_prefix } clustering noise points with role inversion (size) possibly violating layering or dependency direction (red)" ,
908+ title = f"{ title_prefix } clustering noise points with role inversion (size) possibly violating layering or dependency direction (red)" ,
909909 size_column_name = 'pageToArticleRankDifference' ,
910910 color_column_name = 'betweenness' ,
911- plot_file_path = get_file_path (f" { plot_prefix } _ClusterNoise_role_inverted_bridges " , parameters )
911+ plot_file_path = get_file_path ("ClusterNoise_role_inverted_bridges " , parameters )
912912)
913913
914914driver .close ()
0 commit comments