"Fossies" - the Fresh Open Source Software Archive

Member "veusz-3.1/examples/markerspolygon.vsz" (15 Aug 2013, 2031 Bytes) of package /linux/privat/veusz-3.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # Veusz saved document (version 1.6)
    2 # User: jss
    3 # Date: Tue, 19 Jan 2010 21:30:02 +0000
    4 
    5 SetDataExpression(u'stary_offset', u'stary+0.1', linked=True)
    6 SetDataExpression(u'starx_offset', u'starx+0.1', linked=True)
    7 
    8 # star shape for polygon
    9 ImportString(u'stary(numeric)','''
   10 -1.200000e+00
   11 -3.708000e-01
   12 -3.708000e-01
   13 1.416000e-01
   14 9.708000e-01
   15 4.584000e-01
   16 9.708000e-01
   17 1.416000e-01
   18 -3.708000e-01
   19 -3.708000e-01
   20 ''')
   21 ImportString(u'starx(numeric)','''
   22 0.000000e+00
   23 -2.700000e-01
   24 -1.141200e+00
   25 -4.356000e-01
   26 -7.056000e-01
   27 0.000000e+00
   28 7.056000e-01
   29 4.356000e-01
   30 1.141200e+00
   31 2.700000e-01
   32 ''')
   33 
   34 Set('StyleSheet/xy/markerSize', u'5pt')
   35 Set('StyleSheet/xy/MarkerFill/color', u'#aaaaff')
   36 Set('StyleSheet/xy/PlotLine/color', 'grey')
   37 
   38 Add('page', name='page1', autoadd=False)
   39 To('page1')
   40 Add('graph', name='graph1', autoadd=False)
   41 To('graph1')
   42 Add('axis', name='x', autoadd=False)
   43 To('x')
   44 Set('label', u'Outward ticks on this x axis')
   45 Set('min', -2.0)
   46 Set('max', 2.0)
   47 Set('outerticks', True)
   48 To('..')
   49 Add('axis', name='y', autoadd=False)
   50 To('y')
   51 Set('label', u'Outward ticks on this y axis')
   52 Set('min', -2.0)
   53 Set('max', 2.0)
   54 Set('outerticks', True)
   55 Set('direction', 'vertical')
   56 To('..')
   57 Add('polygon', name='polygon2', autoadd=False)
   58 To('polygon2')
   59 Set('xPos', u'starx')
   60 Set('yPos', u'stary')
   61 Set('positioning', u'axes')
   62 Set('Line/hide', True)
   63 Set('Fill/color', u'cyan')
   64 Set('Fill/transparency', 10)
   65 To('..')
   66 Add('polygon', name='polygon1', autoadd=False)
   67 To('polygon1')
   68 Set('xPos', u'starx_offset')
   69 Set('yPos', u'stary_offset')
   70 Set('positioning', u'axes')
   71 Set('Line/hide', True)
   72 Set('Fill/color', u'blue')
   73 To('..')
   74 
   75 colours = ['blue', 'cyan', 'lightgreen', 'purple', 'pink']
   76 
   77 # add plot symbols for each type of plot symbol
   78 codes = veusz_markercodes
   79 for i, mcode in enumerate(codes):
   80     r = 1.6 + 0.2 * sin(16*pi/len(codes)*i)
   81     x = r*sin(2*pi/len(codes)*i)
   82     y = r*cos(2*pi/len(codes)*i)
   83     Add('xy', name=mcode, marker=mcode, xData=[x,x*1.2], yData=[y,y*1.2],
   84         MarkerFill__color=colours[i % len(colours)])
   85 
   86 To('..')
   87 To('..')