Good evening,
I have really long node labels for my 2nd group of vertices on my bipartite graph. This causes my node labels to overlap with eachother and look incredibly ugly. A picture of this is shown below:
I've been trying for a while to make the graph look presentable, and I'm totally stumped. The node labels are formated "Race Sex PoliceComplaintType". So for example, "White Female Abuse of Authority". I tried rotating the node labels diagonally but couldn't figure out how to do it. I've tried adding carriage returns or new lines so that the node labels print like:
"Race
Sex
PoliceComplaintType".
This works in my table, but it doesn't show up on the plot. The code that adds the new lines to the table are shown below:
race = string(D.RACE);
sex = string(D.SEX);
type = string(D.TYPE);
dummyStr = race + newline + sex + newline + type
D.COMBO = dummyStr;
I've already extended the spacing between each node by manually setting the XData. But the graph is already so wide, and I worry making it any wider will just make it even harder to read. Does anyone know of a way I can manipulate my Node Labels to make them appear legibly on my graph?
Code for the graph plotting is included below:
LWidths = 5*G2.Edges.Weight/max(G2.Edges.Weight);
figure(3)
p = plot(G2);
idx3 = find(G2.Edges.Weight > 4);
labeledge(p,idx3,G2.Edges.Weight(idx3))
p.LineWidth = LWidths;
p.EdgeFontSize = 10;
layout(p,"layered");
p.YData = yData3;
p.XData = xData3;
title(" Bipartite Graph: Units vs Combined Demographic & Complaint Data");
0 Comments
Sign in to comment.