Giter Site home page Giter Site logo

selflib's Introduction

LICENSE

selflib

This repository contains all useful self-made modules for research purpose or just for fun.

plotlib

This is a module for ploting diagram purporse. Now it supports generating the bar, line and pie chart.

How to use

To use this library, you should first put it under the same directory as the file you want to do the plot.

import plotlib as pl

API Reference

  • Generating the Bar Chart
@para	data			Dataset
@para	loc			Location of the image
@para	grplabel		Label for each group under the x-axis
@para	onavg			Whether generate the average group
@para	text			Whether annotate the value on each bar
@para	color			Color list for each bar
@para	legend			Legend Info
@para	title			Title
@para	xlabel			Xlabel on the x-axis
@para	ylabel			Ylabel on the y-axis

bar_plot(data, loc=None, grplabel=None, onavg=False, text=False, color=None, legend=None, title=None, xlabel=None, ylabel=None)
  • Generating the Line Chart
@para	data			Dataset
@para	loc			Location of the image
@para	mark			Marker list shown on each point on line
@para	color			Color list for each bar
@para	legend			Legend Info
@para	title			Title
@para	xlabel			Xlabel on the x-axis
@para	ylabel			Ylabel on the y-axis

line_plot(data, loc=None, color=None, mark=None, legend=None, title=None, xlabel=None, ylabel=None)
  • Generating the Pie Chart
@para	data			Dataset
@para	loc			Location of the image
@para	sangle			The start angle when drawing the pie chart
@para	text			Whether annotate the value on each bar
@para	color			Color list for each bar
@para	legend			Legend Info
@para	title			Title
@para	xlabel			Xlabel on the x-axis
@para	ylabel			Ylabel on the y-axis

pie_plot(data, loc=None, sangle=90.0, text=False, color=None, legend=None, title=None, xlabel=None, ylabel=None)

In plotlib directory, we provide a simple example.py file to help you master this module. It can output simple chart for each type.

selflib's People

Contributors

noyafangzhou avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.