Xyplot
Plotting with python made easy
Install / Use
/learn @xypnox/XyplotREADME
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.
<div align='center' > <img width='300' src="https://i.redd.it/zhscjhjr3nb21.jpg" alt="Meme depicting my struggle" /> </div>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
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!
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
