12 Rose plots

class rose_plot.T
Rose plot class is contributed by Kilian Hagemann. It's still experimental. Image roseplottest

Sample rose plot

Below is the source code that produces the above chart. /home/saito/pychart/demos/roseplottest.py

#
# Copyright (C) 2000-2005 by Yasushi Saito (yasushi.saito@gmail.com)
# 
# Pychart is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
#
# Pychart is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
from pychart import *

theme.use_color = 1

data1 = [ 0.27027027,  0.74324324,  0.          ,
          0.34459459  ,0.47297297  ,0.06756757,
          0.90540541  ,1.          ,0.40540541  ,
          0.33783784  ,0.33783784  ,0.16216216]
data2 = [ 0.93333333,  0.46666667  ,0.26666667  ,
          0.60666667  ,0.6         ,0.73333333,
          0.22666667,  0.72        ,0.13333333  ,
          0.46666667  ,1.          ,0.29333333]
data = [('/7Model', data1), ('/7Station', data2)]
        
ar = area.T(legend=legend.T(loc=(100,-5), right_fudge=0, left_fudge=3))

plot = rose_plot.T(data=data, sector_centred=True)
ar.add_plot(plot)
ar.draw()

This class supports the following attributes:

base_radius
Type: number Default: None.

center
Type: (x,y) Default: None.

data
Type: any Default: None.

Specifies the data points. See Section 5

data_col
Type: int Default: 1.

The column, within "data", from which the data values are retrieved.

dir_fill_style
Type: fill_style.T ( see Section 16) Default: fill_style.default.

dir_line_style
Type: line_style.T ( see Section 14) Default: None.

dir_offset
Type: length in points ( See Section 4) Default: None.

The distance between the directions and the outermost circle. Defaults fine for most cases

fill_styles
Type: list Default: ['fill_style.black', 'fill_style.gray70', 'fill_style.diag', 'fill_style.gray50', 'fill_style.white', 'fill_style.rdiag', 'fill_style.vert', 'fill_style.gray30', 'fill_style.gray20', 'fill_style.gray10', 'fill_style.diag2', 'fill_style.rdiag2', 'fill_style.diag3', 'fill_style.horiz', 'fill_style.gray90', 'fill_style.rdiag3', 'fill_style.wave', 'fill_style.vwave', 'fill_style.stitch', 'fill_style.lines', 'fill_style.diag_fine', 'fill_style.diag2_fine', 'fill_style.diag3_fine', 'fill_style.rdiag_fine', 'fill_style.rdiag2_fine', 'fill_style.rdiag3_fine', 'fill_style.horiz_fine', 'fill_style.vert_fine'].

The fill style of each item. The length of the list should be equal to the length of the data.

label_col
Type: int Default: 0.

The column, within "data", from which the labels of items are retrieved.

line_style
Type: line_style.T ( see Section 14) Default: linestyle: width=0.3, color=default, dash=None, cap=0, join=0.

sector_centred
Type: int Default: 1.

Bool indicating whether the sectors should be centred on each sector_width(e.g. on 0)

sector_width
Type: int Default: None.

shadow
Type: (xoff,yoff,fill) Default: None.

The value is either None or a tuple. When non-None, a drop-shadow is drawn beneath the object. X-off, and y-off specifies the offset of the shadow relative to the object, and fill specifies the style of the shadow ( see Section 16).

start_angle
Type: number Default: 90.