I have created Qplt (Quick Plot), an Ada-GUI program to quickly produce a plot of a data set, and make it publicly available in hopes that it might prove useful. The program automatically selects axis ranges and tick intervals. The user may select whether points, lines, or both are plotted, and supply a title and axis labels.
That’s interesting. Can you post screenshots to get an idea of what it looks like ?
It’s one Ada file/unit, so I figured people would just build it and try some of the sample inputs to see what it does. But I’ll see if I can post some screen shots here.
I also did something similar for Alice/Project Euler. For advanced users, I developed a Plotter interface with an implementation in Gnoga (+html canvas). It allows to plot figures (lines, rectangles, arcs), functions, putting comments and synchronize with the GUI buttons (Start/Stop/Continue). More details in the upcoming tutorial for Alice/Project Euler.
The image below shows the solution for the Project Euler problem number 14, paused to show the user a comment with the meaning of the lines shown.
Interesting, just today I needed something similar but for plotting data on real-time. I used Dimitri Kazakov’s Aicwl library which provides an oscilloscope widget for GTK3 Ada industrial control widget library
As I need to plot some simple data, I decided to give it a try.
This is not just compiling one file. There are dependencies that are not manageable with Alire.
So I did it quick and dirty :
Create a Alire project
Copy the content of Ada_GUI repository in src dir
Copy the content of PragmARC repository in src dir
Build
The build finished successfully.
Running the app does not do what’s expected.
A Firefox tab in open. The content of the tab is No file "" found.
In the terminal I get :
Ada GUI :1.0
Application root :Z:\ada\alire_projects\qplt\
Executable at :Z:\ada\alire_projects\qplt\bin\
HTML root :Z:\ada\alire_projects\qplt\
Upload directory :Z:\ada\alire_projects\qplt\
Templates root :Z:\ada\alire_projects\qplt\
/js at :Z:\ada\alire_projects\qplt\
/css at :Z:\ada\alire_projects\qplt\
/img at :Z:\ada\alire_projects\qplt\
Boot file :boot.html
HTTP listen on :localhost:8080
Singleton application.
Press Ctrl-C to close server.
2023-06-04 12:09:11.75 : HTTP Server Started
2023-06-04 12:09:12.97 : Requested: Kind: FILE, File: , Query:
2023-06-04 12:09:12.99 : Reply: Not found
Nice. You can do similar things with Ada GUI with Graphic_Area and the Plotting subpackage, but this is more complex than I envisioned for a quick plot.
Sorry, I didn’t mean to imply that it’s just one file if you don’t already have and understand the dependencies, though it certainly comes across that way. What you’re missing is that Ada-GUI programs need boot.html, boot.js, and jquery.min.js available, as specified in the Ada-GUI Readme.
Certainly Ada GUI and the PragmARCs could be made available via Alire, but I don’t think that would help with this problem.
I admit I didn’t took time to read Ada_GUI readme.
Adding the specified files to the current directory solved the problem. Thanks for pointing on this.
Maybe an argument specifying the location of these files could ease running the app. Especially in an Alire environment.