Apr 23, 2023 | Matplotlib, Python
Download Data File: Download import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.ticker as ticker def millions_and_thousands_formatter(x, pos): if x >= 1_000_000: return f'{x/1_000_000:.1f} MM’ elif x >= 1_000: return...
Apr 20, 2023 | Matplotlib, Python
data_file_download.py from datetime import datetime import time import pandas as pd tickers = [‘TSLA’, ‘AAPL’, ‘AMZN’, ‘UAL’] datasets = {} # year to day today_timestamp = int(datetime.now().timestamp()) for ticker in...
Dec 28, 2022 | Matplotlib, Python
Buy Me a Coffee? Your support is much appreciated! demo.py import numpy as np import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv(‘data.csv’, index_col=0) indx_order = np.arange(df.shape[0]) averages = {} averages[‘Math...
Dec 26, 2022 | Matplotlib, Python
Buy Me a Coffee? Your support is much appreciated! demo.py import numpy as np import matplotlib.pyplot as plt # prepare the data x_data = (20, 35, 30, 25, -28) y_data = (25, 32, 35, 20, -22) n = len(x_data) x_location = np.arange(n) bar_width = 0.35 fig, ax =...
Nov 29, 2022 | Matplotlib, PyQt5, PyQt6, Python
Buy Me a Coffee? Your support is much appreciated! demo.py import sys import matplotlib matplotlib.use(“Qt5Agg”) import numpy as np from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.figure import Figure #...