Skip to main content

A Python package for graphing mathematical equations from string input

Project description

Abdullah Graph Equation

A Python package for graphing mathematical equations from string input.

Installation

pip install abdullah_graph_eq

Usage

from abdullah_graph_eq import graph_equation

# Graph a simple quadratic equation
graph_equation("x**2 + 2*x + 1")

# Graph a trigonometric function
graph_equation("sin(x)")

# Graph with custom range
graph_equation("x**3 - 2*x**2 + x - 1", x_range=(-5, 5))

# Save the plot
graph_equation("cos(x) + sin(2*x)", save_path="my_graph.png")

Features

  • Parse mathematical equations from strings
  • Support for common mathematical functions (sin, cos, tan, log, exp, etc.)
  • Customizable plotting range
  • Save plots to files
  • Support for multiple equation formats

Supported Functions

  • Basic arithmetic: +, -, *, /, ** (power)
  • Trigonometric: sin, cos, tan, asin, acos, atan
  • Exponential/Logarithmic: exp, log, ln, log10
  • Other: sqrt, abs

Examples

Linear Function

graph_equation("2*x + 3")

Quadratic Function

graph_equation("x**2 - 4*x + 3")

Trigonometric Function

graph_equation("sin(x) + cos(2*x)")

Complex Function

graph_equation("exp(-x**2) * sin(5*x)")

Requirements

  • Python 3.7+
  • matplotlib
  • numpy
  • sympy

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abdullah_graph_eq-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abdullah_graph_eq-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file abdullah_graph_eq-0.1.0.tar.gz.

File metadata

  • Download URL: abdullah_graph_eq-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for abdullah_graph_eq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 65a74ae2ecb08bd92dc6418d7f43d0c4e9500e3dec5a3854896284e00854a9c3
MD5 97449bdf73ceb060f7208e3fdafba777
BLAKE2b-256 f1fb853fcab96a836ff7fc98ecb89ef2b387e2d3a376682fe640d44e772bad72

See more details on using hashes here.

File details

Details for the file abdullah_graph_eq-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for abdullah_graph_eq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 665fd278b6cb644f45c9b80463e3e883a3ba1b3d42de871248a46c5a0258ff79
MD5 8df10bfac97d5721b70fcdb495cde5e7
BLAKE2b-256 d9eae22e548aee217106f62fdf088c8409e2bb8fd49223ef543629e969991ce0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page