Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4569400
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:12:50+00:00 2026-05-21T19:12:50+00:00

I would like to draw a circular graph of nodes where certain nodes have

  • 0

I would like to draw a circular graph of nodes where certain nodes have a link between them. Here are a few examples from social network graphs:

example1
(source: wrightresult.com)

example2

example3
(source: twit88.com)

How can this be done with MATLAB? Is it possible without installing a separate package?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:12:50+00:00Added an answer on May 21, 2026 at 7:12 pm

    Here is one way you can do what you want. First, generate points on the circle that you are interested in

    clear;
    theta=linspace(0,2*pi,31);theta=theta(1:end-1);
    [x,y]=pol2cart(theta,1);
    

    Next, if you know the pairs of nodes that are connected, you can skip this step. But in many cases, you get a connectivity matrix from other computations, and you find the indices of the connected nodes from that. Here, I’ve created a Boolean matrix of connections. So, if there are N nodes, the connectivity matrix is an NxN symmetric matrix, where if the i,jth element is 1, it means you have a connection from node i to node j and 0 otherwise. You can then extract the subscripts of the non-zero pairs to get node connections (only the upper triangle is needed).

    links=triu(round(rand(length(theta))));%# this is a random list of connections
    [ind1,ind2]=ind2sub(size(links),find(links(:)));
    

    This is the connectivity matrix I generated with the code above.

    enter image description here

    Now we just need to plot the connections, one at a time

    h=figure(1);clf(h);
    plot(x,y,'.k','markersize',20);hold on
    arrayfun(@(p,q)line([x(p),x(q)],[y(p),y(q)]),ind1,ind2);
    axis equal off
    

    which will give you a figure similar to your examples

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 CGPoints and a would like to draw straight line between them,
I would like to draw a chart in OpenGL similar to the donut graph
I would like to draw a line or bar graph using HTML5 canvas. I
I would like to draw a box using SAS/GRAPH with a color gradient (say
We have an array of points through which we would like to draw a
In C# i have a picturebox. i would like to draw 4 colors. The
I would like to draw diagrams and charts and have the following restrictions: -
I have 3d mesh and I would like to draw each face a 2d
I would like to draw a straight line between where a user touches the
I would like to draw a separator between two views. I am aware that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.