a graphical user interface¶
As a programmers interface, phcpy was developed in a Terminal window, of 80 characters wide and 40 lines long. Python comes with Tkinter, which provides tools for building a graphical user interface. The goal of the module dashboard is to develop a graphical user interface to the methods of phcpy.
scrolling a list of solutions¶
The blackbox solver solve of phcpy.solver returns a list of strings.
In the command line mode, we can print the solutions, one after the other.
The scrollsols
function launches a simple interface to scroll through
the list of solutions, by clicking on previous
or next
buttons.
The session below illustrates the scrolling through the solutions of
the cyclic 5-roots problem.
>>> from phcpy.families import cyclic
>>> c5 = cyclic(5)
>>> from phcpy.solver import solve
>>> sols = solve(c5, silent=True)
>>> from phcpy.dashboard import scrollsols
>>> scrollsols(sols)
The window that then pops up in shown in Fig. 15. Note that, because of different choices of random constants, the first solution will most likely be different at each run.

Fig. 15 Scrolling the solutions of the cyclic 5-roots system.¶
making a coordinate plot of solutions¶
Solutions have coordinates in the complex plane. As in the case of the cyclic 5-roots problem, a plot of one of the coordinates in the complex plane reveals the pattern of the distribution in the roots, see Fig. 16.

Fig. 16 The first coordinate of cyclic 5-roots in the complex plane.¶
The plot appears in a canvas widget, in the GUI launched
by the function plotcoordinate(sols, idx)
where sols
is the list of solutions and idx
an index to a coordinate
of the solutions.