Python Matplotlib: Create chart for every 4 columns in Excel file - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Python Matplotlib: Create chart for every 4 columns in Excel file (/thread-32559.html) |
Python Matplotlib: Create chart for every 4 columns in Excel file - JaneTan - Feb-18-2021 Hi I want to loop through every 4 columns in an Excel file and create line charts in a pdf file. There is no upload function for me to show my Excel file as sample. Basically create 4 lines in a single chart for Column B-E, another 4 lines in a 2nd single chart for Column F-I. Column A will be the date, or x-axis in the charts The excel file could have many set of 4 columns, so the code must loop through all of them and create all the charts in a single pdf file (1 chart per page). How do I do so? THank you RE: Mathlab: Create chart for every 4 columns in Excel file - Larz60+ - Feb-18-2021 go to pypi.org and search for the packages that you will need to complete. -------------------- for excel, visit: https://pypi.org/search/?q=excel There are also published guides available (which may or may not be biased) for example, for excel see: https://www.python-excel.org/ openpyxl is a good choice: https://pypi.org/project/openpyxl/ -------------------- For PDF, there are again many packages available visit: https://pypi.org/search/?q=pdf&o= Report Lab: https://www.reportlab.com/opensource/ is praised as being an excellent choice (my experience is limited, so refrain from adding my opinion) RE: Mathplotlib: Create chart for every 4 columns in Excel file - JaneTan - Feb-28-2021 Hi I want to use Mathplotlib for it. Basically, it should loop through every 4 columns in my Excel file and create a separate graph for every 4 column Every 4 columns will be the Revenue, Cost, Wage and Profit for a firm. The graph for each firm will have the 4 lines for Revenue, Cost, Wage and Profit Thank you |