def addSettings(klass, s): '''Construct list of settings.''' NonOrthGraph.addSettings(s) s.add( setting.FloatOrAuto('maxradius', 'Auto', descr='Maximum value of radius', usertext='Max radius') ) s.add( setting.Choice('units', ('degrees', 'radians'), 'degrees', descr = 'Angular units', usertext='Units') ) s.add( setting.Choice('direction', ('clockwise', 'anticlockwise'), 'anticlockwise', descr = 'Angle direction', usertext = 'Direction') ) s.add( setting.Choice('position0', ('right', 'top', 'left', 'bottom'), 'right', descr = 'Direction of 0 angle', usertext = u'Position of 0°') ) s.add( TickLabel('TickLabels', descr = 'Tick labels', usertext='Tick labels'), pixmap='settings_axisticklabels' ) s.add( Tick('Tick', descr = 'Tick line', usertext='Tick'), pixmap='settings_axismajorticks' ) s.get('leftMargin').newDefault('1cm') s.get('rightMargin').newDefault('1cm') s.get('topMargin').newDefault('1cm') s.get('bottomMargin').newDefault('1cm')
def addSettings(klass, s): '''Construct list of settings.''' NonOrthGraph.addSettings(s) s.add( setting.FloatOrAuto('maxradius', 'Auto', descr=_('Maximum value of radius'), usertext=_('Max radius'))) s.add( setting.Choice('units', ('degrees', 'radians'), 'degrees', descr=_('Angular units'), usertext=_('Units'))) s.add( setting.Choice('direction', ('clockwise', 'anticlockwise'), 'anticlockwise', descr=_('Angle direction'), usertext=_('Direction'))) s.add( setting.Choice('position0', ('right', 'top', 'left', 'bottom'), 'right', descr=_('Direction of 0 angle'), usertext=_(u'Position of 0°'))) s.add(TickLabel('TickLabels', descr=_('Tick labels'), usertext=_('Tick labels')), pixmap='settings_axisticklabels') s.add(Tick('Tick', descr=_('Tick line'), usertext=_('Tick')), pixmap='settings_axismajorticks') s.get('leftMargin').newDefault('1cm') s.get('rightMargin').newDefault('1cm') s.get('topMargin').newDefault('1cm') s.get('bottomMargin').newDefault('1cm')
def __init__(self, parent, name=None): '''Initialise polar plot.''' NonOrthGraph.__init__(self, parent, name=name) if type(self) == NonOrthGraph: self.readDefaults()
def addSettings(klass, s): '''Construct list of settings.''' NonOrthGraph.addSettings(s) s.add( setting.Choice('mode', ('percentage', 'fraction'), 'percentage', descr=_('Show percentages or fractions'), usertext=_('Mode')) ) s.add( setting.Choice('coords', ('bottom-left', 'bottom-right', 'left-bottom', 'left-right', 'right-left', 'right-bottom'), 'bottom-left', descr=_('Axes to use for plotting coordinates'), usertext=_('Coord system')) ) s.add( setting.Str('labelbottom', '', descr=_('Bottom axis label text'), usertext=_('Label bottom')) ) s.add( setting.Str('labelleft', '', descr=_('Left axis label text'), usertext=_('Label left')) ) s.add( setting.Str('labelright', '', descr=_('Right axis label text'), usertext=_('Label right')) ) s.add( setting.Float('originleft', 0., descr=_('Fractional origin of left axis at its top'), usertext=_('Left origin')) ) s.add( setting.Float('originbottom', 0., descr=_('Fractional origin of bottom axis at its left'), usertext=_('Bottom origin')) ) s.add( setting.Float('fracsize', 1., descr=_('Fractional size of plot'), usertext=_('Size')) ) s.add( setting.Bool('reverse', False, descr=_('Reverse axes'), usertext=_('Reverse')) ) s.add( AxisLabel('Label', descr = _('Axis label settings'), usertext = _('Axis label')), pixmap='settings_axislabel' ) s.add( TickLabel('TickLabels', descr = _('Tick label settings'), usertext = _('Tick labels')), pixmap='settings_axisticklabels' ) s.add( MajorTick('MajorTicks', descr = _('Major tick line settings'), usertext = _('Major ticks')), pixmap='settings_axismajorticks' ) s.add( MinorTick('MinorTicks', descr = _('Minor tick line settings'), usertext = _('Minor ticks')), pixmap='settings_axisminorticks' ) s.add( GridLine('GridLines', descr = _('Grid line settings'), usertext = _('Grid lines')), pixmap='settings_axisgridlines' ) s.add( MinorGridLine('MinorGridLines', descr = _('Minor grid line settings'), usertext = _('Grid lines for minor ticks')), pixmap='settings_axisminorgridlines' ) s.get('leftMargin').newDefault('1cm') s.get('rightMargin').newDefault('1cm') s.get('topMargin').newDefault('1cm') s.get('bottomMargin').newDefault('1cm') s.MajorTicks.get('number').newDefault(10) s.MinorTicks.get('number').newDefault(50) s.GridLines.get('hide').newDefault(False) s.TickLabels.remove('rotate')
def addSettings(klass, s): '''Construct list of settings.''' NonOrthGraph.addSettings(s) s.add( setting.Choice('mode', ('percentage', 'fraction'), 'percentage', descr=_('Show percentages or fractions'), usertext=_('Mode')) ) s.add( setting.Choice('coords', ('bottom-left', 'bottom-right', 'left-bottom', 'left-right', 'right-left', 'right-bottom'), 'bottom-left', descr=_('Axes to use for plotting coordinates'), usertext=_('Coord system')) ) s.add( setting.Str('labelbottom', '', descr=_('Bottom axis label text'), usertext=_('Label bottom')) ) s.add( setting.Str('labelleft', '', descr=_('Left axis label text'), usertext=_('Label left')) ) s.add( setting.Str('labelright', '', descr=_('Right axis label text'), usertext=_('Label right')) ) s.add( setting.Float('originleft', 0., descr=_('Fractional origin of left axis at its top'), usertext=_('Left origin')) ) s.add( setting.Float('originbottom', 0., descr=_('Fractional origin of bottom axis at its left'), usertext=_('Bottom origin')) ) s.add( setting.Float('fracsize', 1., descr=_('Fractional size of plot'), usertext=_('Size')) ) s.add( AxisLabel('Label', descr = _('Axis label settings'), usertext = _('Axis label')), pixmap='settings_axislabel' ) s.add( TickLabel('TickLabels', descr = _('Tick label settings'), usertext = _('Tick labels')), pixmap='settings_axisticklabels' ) s.add( MajorTick('MajorTicks', descr = _('Major tick line settings'), usertext = _('Major ticks')), pixmap='settings_axismajorticks' ) s.add( MinorTick('MinorTicks', descr = _('Minor tick line settings'), usertext = _('Minor ticks')), pixmap='settings_axisminorticks' ) s.add( GridLine('GridLines', descr = _('Grid line settings'), usertext = _('Grid lines')), pixmap='settings_axisgridlines' ) s.add( MinorGridLine('MinorGridLines', descr = _('Minor grid line settings'), usertext = _('Grid lines for minor ticks')), pixmap='settings_axisminorgridlines' ) s.get('leftMargin').newDefault('1cm') s.get('rightMargin').newDefault('1cm') s.get('topMargin').newDefault('1cm') s.get('bottomMargin').newDefault('1cm') s.MajorTicks.get('number').newDefault(10) s.MinorTicks.get('number').newDefault(50) s.GridLines.get('hide').newDefault(False) s.TickLabels.remove('rotate')