Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the difference between Excel's data visualization and Python's

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "what is the difference between Excel data visualization and Python". In daily operation, I believe many people have doubts about Excel data visualization and Python data visualization. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the questions of "what is the difference between Excel data visualization and Python?" Next, please follow the editor to study!

Effect preview comparison

(1) Python version

Smooth and silky, like the jump of life.

Python version

(2) Excel version

Too young, too simple, not to be outdone, for the old cousin with a sense of intimacy.

To illustrate with the data use example, = OFFSET (A1ping5jing2jing3jue 1) means to start from the A1 cell, move down 5 squares, move 2 squares to the right, and then select 3 downwards. Note: the last 1 means to select this column instead of selecting one more column to the right.

Accordingly, it can be expected that the data needed in the dynamic graph is to use the area returned by OFFSET as the series value of the line chart.

(2) Development tools-form controls

But if you want to dynamically modify the OFFSET return region, you also need to offset it, select the relevant parameters to bind to the cell, and modify the internal parameters of the function by changing the value of the cell. Therefore, the two cells F2 and G2 are set to move down and take down respectively, and the starting position can be selected C1, so there is no need to move to the right and take to the right when selecting the daily production value.

Right-click the slider to format the control, and you can modify the value of the cell through the slider.

Add a name called "Nissan production Plant A", and its reference position is = OFFSET (Sheet1 yield energy plant 1). The default values of the two parameters omitted are 0 and 1, respectively, so that the area of daily energy value can be adjusted through the slider.

Add another date segment to use as the X axis of the line chart

Right-select data and add Y-axis data.

Edit the X axis on the right horizontal axis label and fill in the name you set earlier.

If you want to view the data for each cycle every 7 days, you can also set the step size of the starting day slider to 7, and then change the current span value to 7.

(5) VBA operation cell

What should I do if I want to play automatically as in the effect preview? The answer is to use VBA. Then select a button from the form control, right-click the button, select the specified macro, click New, and start editing the VBA code.

Implementation of Python dynamic Graph

P version of the implementation of the sample diagram see the following code, specifically refer to the author's another article "programmer's desire for survival: use python to surprise his girlfriend Qixi Festival QR code", in which the dynamic bar chart as an example, a detailed description of the drawing ideas and the complete implementation process (and other feeding skills).

Import matplotlib.pyplot as pltimport matplotlib.animation as aniimport pandas as pdimport datetimedf = pd.read_excel (r "D:\ dynamic line chart data sample .xlsx") # read raw data t = datetime.datetime (2020L7 ) # start date fig = plt.figure (figsize= (10Magazine 6)) # canvas plt.rcParams ["font.sans-serif"] = ["Microsoft YaHei"] # Font is set to Microsoft Yahai timeSlot = list (range (1Magazine 63)) + [62] * 20 # Timeline items = ["A Factory", "SSS Energy", "XX heavy Industry"] # Unit list colors = ["# 6495ED", "# FF8C00" "# B0C4DE"] # Color list def draw (date): # data processing-date_list = [] # date period to be drawn for d in range (date): date_list.append (t + datetime.timedelta (days=d)) current_date = t + datetime.timedelta (days=date) # latest day _ df = df [df ["date"]

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report