Code Monkey home page Code Monkey logo

function-plotter's Introduction

Plotter Application with PySide2 and Matplotlib

Introduction

This is a simple python Function Plotter application that allows users to plot mathematical functions using PySide2 for the GUI and Matplotlib for the plotting. With this application, users can visualize various mathematical functions and their curves by entering the equation and specifying the range for the x-axis.

Features

  • Plot mathematical functions with a given equation.
  • Specify the range for the x-axis (Xmin and Xmax).
  • Dark theme interface for a pleasant user experience.

Requirements

To run the Plotter application, you'll need the following:

  • Python 3.x
  • PySide2
  • NumPy
  • Matplotlib

Install the required dependencies using the following command:

pip install PySide2 numpy matplotlib

How to Use

  1. Run the application by executing the script "app.py".

  2. Enter the equation of the function in the "Equation" field. The supported operators are +, -, /, *, and ^ for exponentiation.

  3. Specify the range for the x-axis by entering the minimum and maximum values in the "Xmin" and "Xmax" fields, respectively.

  4. Click the "Plot" button to visualize the function's curve on the canvas.

  5. If you encounter any errors, an error message will be shown in a pop-up window.

Guidelines for Equation Entry

  1. The equation should only contain the supported operators (+, -, /, *, ^) and the variable "x".

  2. Example of valid functions:

    • x^3 + (1/5)x^2 + 3x + 1
    • -(x-4)^2/(x-6)
    • -5
  3. Example of invalid functions:

    • x^3 +
    • -f(x)=(x-4)^2/(x-6)
    • -3x (remember to put * with scalars, correct form is 3*x)
  4. Division by zero is handled, so you don't need to worry about that.

Instructions

If you need further assistance on how to use the application or encounter any issues, you can refer to the "Instructions" page. It contains important guidelines and examples for valid and invalid functions.

Working Examples

Wrong Examples

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.