CircleGraph - Graph

The Graph is the top container of all elements in your circular graph.

Define fundamental parameters of your graph: Defined elements are used until they are changed by explicit (or implicit) command.

Dimension

Define width and height of the graph:
Graph.Type=Circular
Graph.Width=2000
Graph.Height=2000

This will generate a quadratic graph with 2000x2000 pixel width.
When generating a new graph, you should just think about the final use of a graph.
If you want to generate a publication quality picture with 4x4 inch size and a print resolution of 300 DPI the minimal size of the graph should be
4*300 = 1200 pixel widht/height.
To get rid of aliasing artefacts, it might be helpful to generate a 2x larger "raw" graph. and resample it with an image processing program at lower reolution.

The "Graph.Type=Circular" definition is superficial: at present CircleGraph ony draws circular graph - but this might be changed lateron.






Data ranges and offset

Do want to use a full circle or only a part ?
Graph.Arc=270
This defines to use 3 quarters of the full circle (360°)

By default the graph starts at the 12:00 position of a watch.
Graph.AngleOffset=90
Rotates the whole graph by 90°. Thus the graph starts now a the 3:00 position.

To place elements in the graph, it may be convenient to change the datarange.
If you want to place the chromosomes on the circle it is more easy tu use genomic coodinates instead of geometric angles.
Graph.Datarange=1,3200000000
Would allow to place elements at single base resolution onto the graph.






Spacers

Often you do not want to use the whole area of the circle.
In the inner part you hardly can distiguish individual elements.
Keep some space outside the circla and have some spacer between circular bands:
Graph.Inborder=40
Graph.Outborder=10
This tells CircleGraph to use only 50% of the circles area.
The inner 40% (from radius) are not used (Inborder), as well as the outer 10% (Outborder).

In the remining space all further elements are placed.

Graph.BandSpacer=10
Defines to leave a spacer of 10% from the useable area between lateron defined bands.

Graph.SegmentSpacer=1
Defines to leave a spacer of 1% between segments witin a band.
To get bands witout gaps set "Graph.SegmentSpacer=0".






Colors

The varoious elements may be painted with cusomized colors.

CircleGraph accepts the default fixed colors:
Define a custom color with the three values for Red,Green,Blue, ranging from 0-255 (dark-bright):
e.g. a bright pastel green:
pen.color=rgb(232,255,232)


To pick a color, open the color picker tool:


Adjust the color, and copy the RGB-value into clipboard by clicking the ">>" button:






Pen

Like other graphing programs Circlegraph uses a pen to draw line structures.

Pen.Color=Blue
Pen.Width=2

With these commands you set color and width of the pen used for any sub-sequent drawing commands (lines, border or markers, ...).

To give the Pen the same coor as the brush:
Pen.Color=BrushColor


Defined "pen" is used until you change it with the respectice "Pen...." commands explicitely.






Brush

Circlegraph uses a brush to fill solid structures.

Brush.Color=Blue

With this commands you set the brush color used to fill solid objects (bands,segments,marker,textbackground, ...).

To give the brush the same color as the Pen:
Brush.Color=PenColor


Defined "brush" is used until you change it with the respectice "Pen...." commands explicitely.






Font

Define the font for any subsequent text outpuut onto the graph.
Supply a list of ";" separated Key:Value paris to define font characteristics:

Font=Key:Value;Key:Value

KeyValueExample
FaceFont_nameAny font available in your systemFace:Arial
ColorColor of the font.
Any color definition (see above)
Color:rgb(255,128,64)
SizexxSize of fontSize:16
Boldtrue or falseSwitch on/off bold font
Without argument always swithces on.
Instead of True/False you may use abbreviated T/F
Bold:true
Italictrue or falseSwitch on/off italic fontTalic
Underlinetrue or falseSwitch on/off underline fontUNderline:false
StrikeOuttrue or falseSwitch on/off Strikeout fontStrikeout:t

You may use any combination of Key:Value pairs.
E.g. define your font:
Font=Face:Arial;Color:Blue;Size:32;Bold:true;Italic:true;Underline:true;Strkeout:true;

Next switch off Strikeout:
Font=Strikeout:False

Next change color to dark blue (Navy) and switch off italic:
Font=Color:Navy;Italic:False;







Bands

Generate a set of concentric bands witin your graph:
Graph.BandNum=3
The bands will be CS-CircleGraph_v1.00a
Graph.Type=Circular
Graph.Width=2000
Graph.Height=2000
Graph.Arc=270
Graph.AngleOffset=45
Graph.Inborder=40
Graph.Outborder=10
Graph.BandSpacer=10
Graph.brush.Color=Silver
Graph.BandNum=3




These commands generate a very basic graph:


Lets now customize the bands and generate segments and indicators.