Пример #1
0
def stacked_horizontal():
    chart = StackedHorizontalBarChart(settings.width, settings.height,
                                      x_range=(0, 35))
    chart.set_bar_width(10)
    chart.set_colours(['00ff00', 'ff0000'])
    chart.add_data([1,2,3,4,5])
    chart.add_data([1,4,9,16,25])
    chart.download('bar-horizontal-stacked.png')
Пример #2
0
def stacked_horizontal():
    chart = StackedHorizontalBarChart(settings['width'], settings['height'],
                                      x_range=(0, 35))
    chart.set_bar_width(10)
    chart.set_colours(['00ff00', 'ff0000'])
    chart.add_data([1,2,3,4,5])
    chart.add_data([1,4,9,16,25])
    chart.download('bar-horizontal-stacked.png')
Пример #3
0
def __fullfile_chart(title,data,labels,color):
    chart=StackedHorizontalBarChart(WIDTH, len(data)*40,x_range=[0,__max_x(data)])
    chart.set_colours([color])
    chart.add_data(data)
    chart.set_axis_labels(Axis.TOP,[title])
    chart.set_axis_labels(Axis.LEFT,labels)
    chart.set_axis_labels(Axis.RIGHT, __r_labels(data))
    file_name='%s_%s.png' % (title.replace(' ','_').lower(),datetime.now().strftime('%Y-%m-%d'))
    chart.download(file_name)
    return file_name
Пример #4
0
def bar_chart_cve(data, labels, filename, title):
    chart = StackedHorizontalBarChart(settings.width, settings.height,
                                      x_range=(0, 10))
    chart.set_bar_width(10)
    chart.set_title(title)
    chart.set_legend([ 'Impacto','Exploitabilidade'])
    chart.set_colours(['0000ff', 'ff0000'])
    chart.set_legend_position('r')
    chart.set_axis_labels(Axis.LEFT, labels)
    chart.add_data(data)
    chart.download(filename)
Пример #5
0
def stacked_horizontal():
    chart = StackedHorizontalBarChart(400, 200,
                                      x_range=(0, 35))
    chart.set_bar_width(10)
    chart.set_colours(['00ff00', 'ff0000','ACff0C','B0ffE0','C0ffFF'])
    chart.add_data([1,2,3,4,5])
    chart.set_title('This is title')
    chart.set_legend( ['a','b','c','d','e'])
    chart.set_axis_labels('y', ['aa','bb','cc','dd','ee'])
    chart.annotated_data()
    chart.download('bar-horizontal-stacked.png')
Пример #6
0
def bar_chart_cve(data, labels, filename, title):
    chart = StackedHorizontalBarChart(settings.width,
                                      settings.height,
                                      x_range=(0, 10))
    chart.set_bar_width(10)
    chart.set_title(title)
    chart.set_legend(['Impacto', 'Exploitabilidade'])
    chart.set_colours(['0000ff', 'ff0000'])
    chart.set_legend_position('r')
    chart.set_axis_labels(Axis.LEFT, labels)
    chart.add_data(data)
    chart.download(filename)
    def display_user_stats(self, type="pie", filepath="chart.png"):
        """ filepath = display, filepath = url, filepath = real filepath"""
        """displays the number of VMs a user is running"""
        """ types supported pie, bar"""

        values = []
        label_values = []

        #        print self.users
        
        max_v = 0
        for name in self.users:
            number = self.users[name]['count']
            values.append(number)
            label_values.append(name + ":" + str(number))
            max_v = max(max_v, number)

        # print values
        # print label_values

        if type == "pie": 
            chart = PieChart3D(500, 200)
            chart.set_pie_labels(label_values)
        if type == "bar":
            chart = StackedHorizontalBarChart(500,200,
                                            x_range=(0, max_v))
            # the labels seem wrong, not sure why i have to call reverse
            chart.set_axis_labels('y', reversed(label_values))
            # setting the x axis labels
            left_axis = range(0, max_v + 1, 1)
            left_axis[0] = ''
            chart.set_axis_labels(Axis.BOTTOM, left_axis)

            chart.set_bar_width(10)
            chart.set_colours(['00ff00', 'ff0000'])

        # Add some data
        chart.add_data(values)

        # Assign the labels to the pie data

        if filepath == "display":
            #os.system ("open -a /Applications/Safari.app " + '"' + url + '"')
            os.system ("open " + filepath)
        elif filepath == "url":
            url = chart.get_url()
            print url
        else:
            Utility.ensure_dir(filepath)
            chart.download(filepath)
Пример #8
0
    def get_bar_chart_image(self, data, **kw):
        """ Return image path of downloaded image from google charts api"""

        if len(data['y']) == 0:
            return ''

        from pygooglechart import StackedHorizontalBarChart, Axis

        width = int(kw.get('width', 400))
        height = int(kw.get('height', 250))

        max_y = max(data['y'])

        chart = StackedHorizontalBarChart(width,
                                          height,
                                          x_range=[0, max_y],
                                          y_range=[0, len(data['x'])])

        chart.add_data(data['y'])
        chart.set_colours(['76A4FB'])
        chart.set_axis_labels(Axis.LEFT, data['x'])
        bottom_labels = [
            utils.intcomma(x) for x in range(0, max_y + 1, (max_y) / 5)
        ]
        chart.set_axis_labels(Axis.BOTTOM, bottom_labels)

        #Generate an hash from arguments
        kw_hash = hash(tuple(sorted(kw.items())))
        data_hash = hash(
            tuple(sorted([(k, tuple(v)) for k, v in data.iteritems()])))
        args_hash = str(kw_hash) + str(data_hash)

        image_path = os.path.join(TARGET_DIR, "%s.png" % args_hash)

        if bool(kw.get('refresh', False)) or args_hash not in self.charts:
            #Get image from google chart api
            chart.download(image_path)
            if args_hash not in self.charts:
                self.charts.append(args_hash)
            self._p_changed = True

        return image_path
Пример #9
0
def main(argv):

    nTraducidas = int(argv[0])
    nFuzzy = int(argv[1])
    nNoTraducidas = int(argv[2])

    totalCadenas = nTraducidas + nFuzzy + nNoTraducidas
    pTraducidas = (nTraducidas * 100) / totalCadenas
    pNoTraducidas = 100 - pTraducidas
    #print '% traducidos: ' + str(pTraducidas) + ' - % No Traducidos: ' + str(pNoTraducidas)

    chart = StackedHorizontalBarChart(settings.width,
                                      settings.height,
                                      x_range=(0, 100))
    # chart.set_bar_width(100)
    chart.set_colours(['00ff00', 'ff0000'])
    chart.fill_solid('bg', 'e3d185')
    chart.set_zero_line(0, 0)
    chart.add_data([pTraducidas])
    chart.add_data([pNoTraducidas])
    chart.download(argv[3])
    def get_bar_chart_image(self, data, **kw):
        """ Return image path of downloaded image from google charts api"""

        if len(data['y']) == 0:
            return ''

        from pygooglechart import StackedHorizontalBarChart, Axis

        width = int(kw.get('width', 400))
        height = int(kw.get('height', 250))

        max_y = max(data['y'])

        chart = StackedHorizontalBarChart(width, height,
                                        x_range=[0, max_y],
                                        y_range=[0, len(data['x'])])


        chart.add_data(data['y'])
        chart.set_colours(['76A4FB'])
        chart.set_axis_labels(Axis.LEFT, data['x'])
        bottom_labels = [utils.intcomma(x) for x in range(0, max_y + 1, (max_y)/5)]
        chart.set_axis_labels(Axis.BOTTOM, bottom_labels)

        #Generate an hash from arguments
        kw_hash = hash(tuple(sorted(kw.items())))
        data_hash = hash(tuple(sorted([(k, tuple(v))
            for k, v in data.iteritems()])))
        args_hash = str(kw_hash) + str(data_hash)

        image_path = os.path.join(TARGET_DIR, "%s.png" % args_hash)

        if bool(kw.get('refresh', False)) or args_hash not in self.charts:
            #Get image from google chart api
            chart.download(image_path)
            if args_hash not in self.charts:
                self.charts.append(args_hash)
            self._p_changed = True

        return image_path
Пример #11
0
from pygooglechart import SimpleLineChart, StackedHorizontalBarChart, StackedVerticalBarChart, \
    GroupedHorizontalBarChart, GroupedVerticalBarChart
from pygooglechart import PieChart2D
from pygooglechart import PieChart3D
import os
import sys

ROOT = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(ROOT, '..'))


l = [0, 0, 0, 1, 1, 1, 3, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 11, 17, 20, 26, 36, 36, 38, 42, 47, 49, 54, 59, 59, 66, 66, 67, 68, 69, 77, 85, 86, 87, 88, 93, 115, 116, 121, 122, 137, 152, 173, 180, 181, 183, 191, 202, 203, 208, 233, 238, 241, 247, 262, 263, 268, 271, 273, 308, 325, 343, 346, 360, 365, 378, 410, 419, 479, 490, 535, 550, 550, 562, 608, 655, 670, 687, 709, 716, 745, 758, 769, 801, 807, 897, 899, 904, 907, 929, 1074, 1106, 1120, 1120, 1357, 1421, 3049]
a = ['\xd0\xa8\xd0\xb5\xd0\xb2\xd1\x80\xd0\xbe\xd0\xbb\xd0\xb5 \xd1\x84\xd0\xb8\xd0\xb5\xd1\x81\xd1\x82\xd0\xb0 ', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 e230', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 gl320', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 c230', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 cl500', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 e220', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 e320', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 e240', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 g500', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 ml350', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 c200', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 c220', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 ml320', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 viano', '\xd0\x91\xd0\x9c\xd0\x92 325', '\xd0\x91\xd0\x9c\xd0\x92 530', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 e200', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 e280', '\xd0\x91\xd0\x9c\xd0\x92 x6', '\xd0\x9c\xd0\xb5\xd1\x80\xd1\x81\xd0\xb5\xd0\xb4\xd0\xb5\xd1\x81 s600', '\xd0\xa5\xd0\xbe\xd0\xbd\xd0\xb4\xd0\xb0 \xd0\xbb\xd0\xb5\xd0\xb3\xd0\xb5\xd0\xbd\xd0\xb4', '\xd0\x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d0\xb4 \xd0\xbc\xd0\xbe\xd0\xbd\xd0\xb4\xd0\xb5\xd0\xbe', '\xd0\x9d\xd0\xb8\xd1\x81\xd1\x81\xd0\xb0\xd0\xbd \xd0\xb0\xd0\xbb\xd1\x8c\xd0\xbc\xd0\xb5\xd1\x80\xd0\xb0', '\xd0\xa4\xd0\xbe\xd0\xbb\xd1\x8c\xd0\xba\xd1\x81\xd0\xb2\xd0\xb0\xd0\xb3\xd0\xb5\xd0\xbd \xd0\xbf\xd0\xb0\xd1\x81\xd1\x81\xd0\xb0\xd1\x82', '\xd0\x9e\xd0\xbf\xd0\xb5\xd0\xbb\xd1\x8c \xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xb0', '\xd0\x9e\xd0\xbf\xd0\xb5\xd0\xbb\xd1\x8c \xd0\xb2\xd0\xb5\xd0\xba\xd1\x82\xd1\x80\xd0\xb0', '\xd0\xa4\xd0\xbe\xd1\x80\xd0\xb4 \xd1\x84\xd0\xbe\xd0\xba\xd1\x83\xd1\x81']

index = 0
for i in a:
    print ("%s;%s"%(i.decode("utf-8"),l[index]) )
    index+=1

chart = StackedHorizontalBarChart(400, 700, x_range=(0, max(l) ) )
chart.set_bar_width( 3 )
chart.set_colours(['8159F7', ])
chart.add_data( l )
chart.set_title( "Razbor by models" )
chart.set_legend( ['',] )

a.reverse()
chart.set_axis_labels('y', a )
chart.annotated_data()
chart.download( "razbors_By_models_car.png")