Giter VIP home page Giter VIP logo

xyplot's Introduction

xyplot ๐Ÿ“ˆ

Graph made with xyplot

Plotting with python made easy

Say Thanks PyPI PyPI - License PyPI - Python Version GitHub stars

Are you tired of replicating common steps that are needed to plot even a simple polynomial functions in python's infamous Matplotlib?

Worry no more! Presenting xyplot! Plot polynomials easily and, more importantly, pythonically!

For example, to plot a polynomial best fit curve you only need to:

from xyplot import Curve

# Our data
x, y = [0, 2, 4, 6, 8], [0.8, -1.1, 1.06, 6.75, 16.54]

# A simple curve object with data and degree of polynomial
curve = Curve(x, y, 2)

# Set the x, y axis labels and Title
curve.set(
    xlabel = "Labels are fun and easy",
    ylabel = "Oooh see him Go!",
    title = "I am an easy Graph"
)

# Label our data and curve
curve.createPlot(
    plotLabel="Label for the Curve",
    dataLabel="Label for our DATA",
)

curve.save("sample.png") # Save our graph in high quality

Makes sense right? See examples for other examples.

Fair Warning

This is just a high level sensible wrapper to the matplotlib and numpy package. Its aim is to reduce the workload necessary to make very basic plots.

To make more extensive and customizable plots, refer to matplotlib

Meme depicting my struggle

Why this effort?

Some of the more inquistive and experienced would be asking why the hell did I create an entire package that can only plot polynomials. Because there was nothing similar in matplotlib and I wanted to help those who have only little knowledge of python plot amazing graphs in as few lines and headaches as possible.

For those who still like control, you always have the fig, ax attributes of the curve class available for exploitation! And then, if you are not satisfied, try the OG Matplotlib!

Installation

To install the program run

$ pip install xyplot

If you are using Ubuntu run this instead:

$ pip3 install xyplot

To check whether the installation was successful, try importing it:

from xyplot import Curve

If the import worked, the package is most probably installed.

Note that you may want to install some other python libraries to fully enjoy the Scientific Python experience.

These are recommended:

$ pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose

Documentation?

Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing. โ€” Dick B.

With that said, the documentation can be found here: http://www.xypnox.com/xyplot/xyplot/index.html

Contributions?

Are welcome!

xyplot's People

Contributors

xypnox avatar dependabot[bot] avatar

Stargazers

Roman avatar Albert Tavares de Almeida avatar Nikhil Shah avatar Srijan Nagar avatar  avatar Mukul Mehta avatar  avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

xyplot's Issues

Add interface for plotting arbitrary data and regression with a passed function

What we want to achieve is to plot a set of data and it's fit according to not only polynomial functions (which is already present in the library) but also through arbitrary functions.

For more details on how it is done by matplotlib look into the following references:

https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html
http://scipy-lectures.org/intro/scipy/auto_examples/plot_curve_fit.html

This issue is related to #1

Add support for plotting arbitary functions

Currently there is no method by which we can plot arbitary functions such as trigonometric functions and exponential functions.

We need a way through which we can plot these as well and if possible add a way to do regression on the data passed and a function with a few dependent variables.

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.