Are there any alternatives to 'dolayout' that do not require JVM?
4 views (last 30 days)
Show older comments
I'm trying to find the level structure of a directed graph I have produced and my current script works fine in a Java environment. The script I have now reads:
bg = biograph(adjMatrix);
dolayout(bg);
levels = get(bg.nodes,'position');
coord = cell2mat(coord);
numlevels=length(unique(coord(:,2)));
coord=sortrows(coord(:,2));
leveldist = zeros(1,numlevels);
level = unique(coord);
for kk=1:numlevels
leveldist(kk) = sum(coord==level(kk));
end
leveldist=fliplr(leveldist);
Basically, if I were to have something looking like this:

then the script presently returns
[1 2 2 2 1 2 1 1 1 1 1 1 1 1]
which is precisely the result I am expecting.
However, when running matlab remotely from a unix terminal, I receive an error when 'dolayout' calls 'figure'. This happens even if I start matlab with
-noawt
-nodesktop
Unfortunately, the jvm issue seems like an issue that only the system administrator can resolve.
However, in the meantime, one may notice that at no point in the aforementioned script is a figure ever output. In fact, I can see that in the 'dolayout' script, the offending line (line 86) calls the script 'createdotfile.m', which in turn contains the function
figure('visible','off');
on line 50.
In any event, is there any other way to do this, perhaps with some other function that 'dolayout' in a nojvm environment?
0 Comments
Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!