Share the Gallery !Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

If you read the graph #224, you probably know how to create a simple circular plot, following the 3 steps: initialization, building regions, adding charts. Here, I describe how to custom the general layout and the region appearance.

First, let’s charge the circlize library, and create data to work with. The goal will be to represent the relationship between x and y, for each factor level.

Now, before initializing the circular plot, we can set general parameters. ‘Par‘ allows to do so like for any other R graph. ‘Circos.par‘ allows to set specific parameters like:

  • start.degree= The starting degree from which the circle begins to draw
  • gap.degree= Gap between two neighbour sectors (simple value or vector)
  • custom the margin with track.margin / cell.padding

Now we can initialize the chart. Note that sector.width can be used to custom the size of each sector.

Let’s build the regions now. It’s here that we can custom the axis and borders of regions. Arguments are described in the code below. Type help(circos.axis) for more info.

The last step fills the region with the chart. You can use all the tradiationnal parameters such as pch, cex, col…


Not what you are looking for ? Make a new search !


Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz