@@ -342,7 +342,7 @@ more details.
342
342
remove_aliases! (arg, plotattributes, graph_aliases)
343
343
end
344
344
# The above process will remove all marker properties from the plotattributes
345
- # dictionary. To enusre consistency between markers and nodes, we replace all marker
345
+ # dictionary. To ensure consistency between markers and nodes, we replace all marker
346
346
# properties with the corresponding node property.
347
347
marker_node_collection = zip ([:markershape ,:markersize ,:markercolor ,
348
348
:marker_z ,:markerstrokealpha ,:markeralpha ,
@@ -352,9 +352,23 @@ more details.
352
352
nodealpha,nodestrokewidth,nodestrokealpha,
353
353
nodestrokecolor,nodestrokestyle])
354
354
for (markerproperty, nodeproperty) in marker_node_collection
355
+ # Make sure that the node properties are row vectors.
356
+ nodeproperty isa Array && (nodeproperty = permutedims (vec (nodeproperty)))
355
357
plotattributes[markerproperty] = nodeproperty
356
358
end
357
359
360
+ # Make sure that the node properties are row vectors.
361
+ nodeshape isa Array && (nodeshape = permutedims (vec (nodeshape)))
362
+ nodesize isa Array && (nodesize = permutedims (vec (nodesize)))
363
+ nodecolor isa Array && (nodecolor = permutedims (vec (nodecolor)))
364
+ node_z isa Array && (node_z = permutedims (vec (node_z)))
365
+ nodestrokealpha isa Array && (nodestrokealpha = permutedims (vec (nodestrokealpha)))
366
+ nodealpha isa Array && (nodealpha = permutedims (vec (nodealpha)))
367
+ nodestrokewidth isa Array && (nodestrokewidth = permutedims (vec (nodestrokewidth)))
368
+ nodestrokealpha isa Array && (nodestrokealpha = permutedims (vec (nodestrokealpha)))
369
+ nodestrokecolor isa Array && (nodestrokecolor = permutedims (vec (nodestrokecolor)))
370
+ nodestrokestyle isa Array && (nodestrokestyle = permutedims (vec (nodestrokestyle)))
371
+
358
372
# If we pass a value of plotattributes[:markershape] that the backend does not
359
373
# recognize, then the backend will throw an error. The error is thrown despite the
360
374
# fact that we override the default behavior. Custom nodehapes are incompatible
@@ -427,7 +441,7 @@ more details.
427
441
xl, yl = arcdiagram_limits (x, source, destiny)
428
442
xlims --> xl
429
443
ylims --> yl
430
- ratio --> :equal
444
+ aspect_ratio --> :equal
431
445
elseif all (axis_buffer .< 0 ) # equal axes
432
446
ahw = 1.2 * 0.5 * maximum (v -> maximum (v)- minimum (v), xyz)
433
447
xcenter = mean (extrema (x))
@@ -774,6 +788,9 @@ more details.
774
788
round (Int, length (edges_list[1 ])/ nsegments)),
775
789
reshape (edges_list[2 ], nsegments,
776
790
round (Int, length (edges_list[2 ])/ nsegments)))
791
+ edges_list = ([edges_list[1 ][:, j] for j in 1 : size (edges_list[1 ], 2 )],
792
+ [edges_list[2 ][:, j] for j in 1 : size (edges_list[2 ], 2 )]
793
+ )
777
794
else
778
795
edges_list = (reshape (edges_list[1 ], 3 ,
779
796
round (Int, length (edges_list[1 ])/ 3 )),
@@ -858,7 +875,7 @@ more details.
858
875
seriestype := :scatter
859
876
markersize := 0
860
877
markeralpha := 0
861
- ratio --> :equal
878
+ aspect_ratio --> :equal
862
879
if length (names) == length (x)
863
880
annotations := [(x[i], y[i], names[i]) for i in 1 : length (x)]
864
881
end
@@ -879,12 +896,12 @@ more details.
879
896
end
880
897
else
881
898
if _3d
882
- # seriestype := :scatter3d
883
- # linewidth := 0
884
- # linealpha := 0
885
- # markercolor := nodecolor
886
- # series_annotations --> map(string,names)
887
- # markersize --> (10 .+ (100 .* node_weights) ./ sum(node_weights))
899
+ seriestype := :scatter3d
900
+ linewidth := 0
901
+ linealpha := 0
902
+ markercolor := nodecolor
903
+ series_annotations --> map (string,names)
904
+ markersize --> (10 .+ (100 .* node_weights) ./ sum (node_weights))
888
905
else
889
906
@series begin
890
907
seriestype := :shape
@@ -902,14 +919,12 @@ more details.
902
919
linestyle := nodestrokestyle
903
920
line_z := nodestroke_z
904
921
905
- nodeperimeters = (T [], T [])
922
+ nodeperimeters = (Any [], Any [])
906
923
for (i, vec_xy) in enumerate (node_vec_vec_xy)
907
- append! (nodeperimeters[1 ], [xy[1 ] for xy in vec_xy])
908
- push! (nodeperimeters[1 ], NaN )
909
-
910
- append! (nodeperimeters[2 ], [xy[2 ] for xy in vec_xy])
911
- push! (nodeperimeters[2 ], NaN )
924
+ push! (nodeperimeters[1 ], [xy[1 ] for xy in vec_xy])
925
+ push! (nodeperimeters[2 ], [xy[2 ] for xy in vec_xy])
912
926
end
927
+
913
928
nodeperimeters
914
929
915
930
# if _3d
@@ -926,7 +941,7 @@ more details.
926
941
colorbar_entry --> false
927
942
markersize --> 0
928
943
markeralpha --> 0
929
- ! isnothing (edgelabel) && (annotation --> edge_label_array)
944
+ ! isnothing (edgelabel) && (annotations --> edge_label_array)
930
945
else
931
946
seriestype := :scatter
932
947
0 commit comments