Git Product home page Git Product logo

Comments (19)

taapasX28 avatar taapasX28 commented on May 24, 2024 1

Ok then integrate PyQtgraph.

from calculator_pyqt.

taapasX28 avatar taapasX28 commented on May 24, 2024 1

yes it is allowed

from calculator_pyqt.

venkateshdwivedi avatar venkateshdwivedi commented on May 24, 2024

please provide some description on this.. like which graphs and how to modify etc..

from calculator_pyqt.

07kshitij avatar 07kshitij commented on May 24, 2024

I'm working on it. Will revert soon

from calculator_pyqt.

07kshitij avatar 07kshitij commented on May 24, 2024

#27 PR opened for graphing options. @taapas1128 Please review

from calculator_pyqt.

taapasX28 avatar taapasX28 commented on May 24, 2024

This is assigned to @07kshitij . Try to follow the proper procedure before directly working on it .

from calculator_pyqt.

07kshitij avatar 07kshitij commented on May 24, 2024

Okay, I'll reconsider the same

from calculator_pyqt.

07kshitij avatar 07kshitij commented on May 24, 2024

This is assigned to @07kshitij . Try to follow the proper procedure before directly working on it .

@taapas1128
After a lot of reading, what I found was math.some_function works only for scalar values, i.e. to get values corresponding to a single input, while np.some_function works for arrays. Since, for plotting purposes we need at least a few data points, taking them as an array (in the form of a range of function to be plotted) is the most ideal way IMO. So, I don't see any way to avoid using numpy. Also, the StackOverflow link mentioned by you works only for non-math functions (as they operate on arrays fine), while functions like sin/cos give typeError. Replacing them by np.sin etc works perfectly fine.
https://stackoverflow.com/questions/30712402/python-what-is-the-difference-between-math-exp-and-numpy-exp-and-why-do-numpy-c

from calculator_pyqt.

taapasX28 avatar taapasX28 commented on May 24, 2024

Yeah numpy is fine then I just wanted to know why you needed that dependency . And did you deal with the other issue ?

from calculator_pyqt.

07kshitij avatar 07kshitij commented on May 24, 2024

Actually I didn't understand what you meant by using Tkinter dependency(Don't know much about it, I read a bit but didn't get much). Can you please elaborate more. (As to what part of code feels erroneous to you)

from calculator_pyqt.

taapasX28 avatar taapasX28 commented on May 24, 2024

Actually the window that opens while plotting the graph possibly it does not open a PyQt window but a Tkinter window by default. So read the Stack overflow article there instead of calling the mathplotlib library the import mathplotlib with PyQt dependency .

from calculator_pyqt.

07kshitij avatar 07kshitij commented on May 24, 2024

Actually the window that opens while plotting the graph possibly it does not open a PyQt window but a Tkinter window by default. So read the Stack overflow article there instead of calling the mathplotlib library the import one with PyQt dependency .

Okay, will read about it.

from calculator_pyqt.

07kshitij avatar 07kshitij commented on May 24, 2024

I came across this StackOverflow article that uses pyqtgraph, a GUI library built on PyQt and numpy. It basically does the same function as matplotlib, but doesn't use it. (Basically it's a PyQt lib). Will it be fine if I use it?

You may read more about it here
https://stackoverflow.com/questions/3972158/how-to-plot-on-my-gui
http://www.pyqtgraph.org/

from calculator_pyqt.

taapasX28 avatar taapasX28 commented on May 24, 2024

Yes you can integrate it .. didn't the previous article about matplotlib with pyqt suffice ?

from calculator_pyqt.

07kshitij avatar 07kshitij commented on May 24, 2024

Yes you can integrate it .. didn't the previous article about matplotlib with pyqt suffice ?

It was too big to integrate into the already set code. In PyQtgraph, I simply need to import pyqtgraph and replace matplotlib everywhere with PyQtgraph.

from calculator_pyqt.

07kshitij avatar 07kshitij commented on May 24, 2024

I'm opening a PR for the same, kindly review.

from calculator_pyqt.

07kshitij avatar 07kshitij commented on May 24, 2024

Isn't there a relatively simpler way out (like taking input from the keyboard). For implementing a new pop-up with function reference to the original Calculator_class, I think we need one more *.py and one *.ui file for the new dialog. But redirecting the buttons to the new dialog still remains tricky.
(P.S. I read the StackOverflow article. We can't do it that way as it takes input from the keyboard, i.e. no use of all those buttons etc, and integrating them is the real challenge)

from calculator_pyqt.

taapasX28 avatar taapasX28 commented on May 24, 2024

Okay I understand you can do one thing take the input equation as usual but delete the range button; instead when the plot button is clicked ask for range using a popup.

from calculator_pyqt.

07kshitij avatar 07kshitij commented on May 24, 2024

Okay I understand you can do one thing take the input equation as usual but delete the range button; instead when the plot button is clicked ask for range using a popup.

Okay great, one more thing, is taking inputs from keyboard allowed, for the range form, I think of displaying 3 text boxes of starting index, ending index and step size and ask the user to enter the corresponding values from keyboard. Is it allowed?

from calculator_pyqt.

Related Issues (20)

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.