WebUI for using interactive python plot functionalities for Google Sheet. The WebUI is developed using the Panel library.
This library allows to get data from the Google Sheet, which follows a defined pattern, and generate a Figure which can be downloaded in .png or .pdf formats.
It allows also user manipulation of the Figure, such as legend format and placement, traces style and others.
First, one must create a Python environment with the modules as listed in the requirements.txt.
To allow the interaction with Google Sheet API, please follow the instructions from Step 1 to Step 3 in GeeksforGeeks
With the Google Sheet And Google Drive API enabled, the requirements for the Panel to work is:
- Google Sheet name must be 'Pattern_Data'.
- Must use 'dot' as decimal separation.
To run the Panel App:
- Download the content of this repository or clone it;
- Open a terminal in the downloaded folder;
- Activate the Python environment; and,
- Enter the following command in the terminal:
panel serve app.py --show --autoreload --port 9001 --allow-websocket-origin *:9001 --allow-websocket-origin=*
The idea for this Panel is to enable a standard spreadsheet format to be translated into a Python plot (using matplotlib). The main elements for the Figure are defined in the spreadsheet, namely:
- Figure Title
- Axis labels
- Curve legend names
After following the Credentials GeeksforGeeks tutorial, the credential .json file is provided in the initial panel:
IMPORTANT: please, give it some time to process the data after entering the credential file.
With the defined Spreadsheet, the working panel has the following layout:
Here, it can be seen that the desired parameters are loaded and a default figure is available. This image can be download as pdf or as png.
There are several options to edit the image, for example:
- Change Title, X and Y label.
- X and Y limits.
- Legend attributes, number of columns and position.
- Curves color and line style.
- Size of the image (width vs height).
- Font size.
- Curve thickness.
Also, the spreadshet can have multiple Sheets, selectable using the dropdown menu 'Select plot tab'.
'Update data' button will refresh plot to default.
For further documentation about the Panel:


