The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Sorting object properties; change marker color for single plot point
Replies: 1   Last Post: Dec 7, 2013 4:28 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 517
Registered: 2/23/10
Sorting object properties; change marker color for single plot point
Posted: Dec 6, 2013 9:23 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I used MatlabBGL to visualize a social network graph by plotting a "scatter graph" of the graph nodes. Just to be clear, it's not really for social network analysis, but it is a bunch of nodes with distance relationships between them all.

Since I'm new to the actual practice of graph visualization (as opposed to having a nodding acquaintance with the general ideas) both in Matlab in in general, I'll supply some details which I suspect are not directly relevant, but I don't know for certain. First, I'm laying out a weighted, undirected graph using the MatlabBGL download, It encapsulates a C++ graph manipulation library in a Matlab interface. The specific function I'm using is kamada_kawai_spring_layout, which is documented at the site for the library: (search for the function name). I found an example Matlab invocation at If edgeDist(i,j) is a symmetric matrix of distances between nodes i and j, then the following gives me a graph:

edgeDistSpLay = kamada_kawai_spring_layout(edgeDistSp);

It's way too dense, so I just want to see how the pattern of cloud of points:


I finangled myself into the above code by noting that get(gca) showed only one "children" in the Children property, and get(get(gca,'Children')) showed a Type property of 'line'.

There are a few key nodes that I want to highlight e.g. maybe by coloring the faces red and making them bigger. I was hoping that I could find myway down the object hierarchy to the exact data point and change its properties (which wouldn't work if the parameters are for the whole series of data). Unfortunately, all the plot symbol properties like MarkerEdgeColor, MarkerSize, and MarkerFaceColor seem to belong to the 'line' object, which itself has a 0x1 double show for Children (a zero dimension array, meaning it has no children). This despite the fact that it has the series data -- I'm *assuming* this because it has XData and YData properties, each being a 1x33708 double (even though there are only 106 nodes). Most of that data is NaNs.

It looks pretty bleak. I will likely have to find the coordinates of the special points from edgeDistSpLay and plot them as separate plots on the same axis. At this point, I'm just guessing at how it all works, and I'll be exploring that in the next little while. Any comments from the greybeards are welcome.

On a related note, is there any way to force the properties of an object of an object to be shown in sorted order? It's really difficult to find something specific from a barrage of properties. Thanks.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.