将图像合并为单个图,同时使用matplotlib保存图

问题描述 投票:0回答:1

下面的代码用于从csv数据中查找模式。

一切都按预期工作,但是在绘图结束时,以前的图像已合并到最新绘图中,是否有可能避免这种情况?


代码:

import pandas as pd
import numpy as np
from scipy.signal import argrelextrema
import matplotlib.pyplot as plt
from harmonic_functions import *
import uuid
import requests
import json


data = pd.read_csv('file.csv')

data.time = pd.to_datetime(data.time,format='%d.%m.%Y %H:%M:%S.%f')
data.index = data['time']
# data = data.drop_duplicates(keep=False)

price = data.close.copy()

err_allowed = 10.0/100

pnl = []
trade_dates=[]
correct_pats=0
pats=0

# plt.ion()

for i in range (100,len(price)):

    current_idx,current_pat,start,end = peak_detect(price.values[:i],order=7)

    XA = current_pat[1] - current_pat[0]
    AB = current_pat[2] - current_pat[1]
    BC = current_pat[3] - current_pat[2]
    CD = current_pat[4] - current_pat[3]

    moves = [XA,AB,BC,CD]

    gart = is_gartley(moves,err_allowed)
    butt = is_butterfly(moves,err_allowed)
    bat = is_bat(moves,err_allowed)
    crab = is_crab(moves,err_allowed)
    shark = is_shark(moves,err_allowed)
    trio = is_trio(moves,err_allowed)
    cyph = is_cyph(moves,err_allowed)
    three_dives = is_3dives(moves, err_allowed)
    fivezero = is_50(moves, err_allowed)
    altbat = is_altbat(moves, err_allowed)
    deepcrab = is_deepcrab(moves, err_allowed)
    dragon = is_dragon(moves, err_allowed)
    snorm = is_snorm(moves, err_allowed)

    harmonics = np.array([gart,butt,bat,crab,shark,trio,cyph,three_dives,fivezero,altbat,deepcrab,dragon,snorm])
    labels = ['Garterly','Butterfly','Bat','Crab','Shark','Trio','Cypher','3Dives','5Zero','AltBat','DeepCrab','Dragon','Snorm']


    if np.any(harmonics == 1) or np.any(harmonics == -1):
        for j in range (0,len(harmonics)):
            if harmonics[j] == 1 or harmonics[j]==-1:
                pats+=1
                sense = 'Bearish ' if harmonics[j]==-1 else 'Bullish '
                label = sense + labels[j] + ' found'
                print(label)

                plt.title(label)
                print(current_pat)
                plt.plot(np.arange(start,i+15),price.values[start:i+15])
                plt.scatter(current_idx,current_pat,c='r')
                print(current_pat)
                filename = str(uuid.uuid1())[:8]
                print(filename)
                plt.savefig(filename)
                plt.close(filename)

我的所有输入数据在下面列出。该地块适用于18号地块,但对于19号地块,也适用于18号地块的诱导/合并,请参见附图。

输入数据

[time,open,high,low,close,volume
18.05.2020 09:15:00.000,9108,9138.7,9073.4,9075,543675
18.05.2020 09:17:00.000,9074.95,9089.4,9064.7,9087,303150
18.05.2020 09:19:00.000,9089,9094.75,9080.5,9082.3,199050
18.05.2020 09:21:00.000,9083.95,9083.95,9057,9063.15,270225
18.05.2020 09:23:00.000,9062.4,9072.65,9055,9063.85,130500
18.05.2020 09:25:00.000,9063.5,9067.7,9050.05,9056.45,193050
18.05.2020 09:27:00.000,9054.85,9065,9051,9064.7,122250
18.05.2020 09:29:00.000,9063.05,9068.8,9044,9048.1,272025
18.05.2020 09:31:00.000,9046.95,9053,9043.05,9048.1,128775
18.05.2020 09:33:00.000,9048.95,9048.95,9015.65,9023.15,349950
18.05.2020 09:35:00.000,9023.6,9024.75,8980,8980,474675
18.05.2020 09:37:00.000,8980.95,9001,8966.5,8996.05,372525
18.05.2020 09:39:00.000,8997.05,9000,8978.6,8986.35,175875
18.05.2020 09:41:00.000,8984.4,8989.7,8941.95,8944,315225
18.05.2020 09:43:00.000,8943.8,8952,8923.7,8925,359625
18.05.2020 09:45:00.000,8923.75,8925.1,8878.05,8897.25,527550
18.05.2020 09:47:00.000,8895.25,8919.95,8888.85,8915.75,300750
18.05.2020 09:49:00.000,8916.05,8944.2,8914,8935.55,284700
18.05.2020 09:51:00.000,8935.4,8937,8903.05,8918,272400
18.05.2020 09:53:00.000,8919.45,8926.65,8900.05,8913.6,154800
18.05.2020 09:55:00.000,8912.4,8923,8904.5,8919.8,121875
18.05.2020 09:57:00.000,8919.75,8932,8916.45,8931.6,113175
18.05.2020 09:59:00.000,8931.85,8935.45,8908.2,8913.4,136500
18.05.2020 10:01:00.000,8913.15,8940,8908.65,8935.35,196725
18.05.2020 10:03:00.000,8934.05,8939,8927,8930.4,151575
18.05.2020 10:05:00.000,8930.6,8947.05,8918,8924,202650
18.05.2020 10:07:00.000,8925.45,8940.1,8924,8934,141225
18.05.2020 10:09:00.000,8935.1,8945,8929.2,8942,101850
18.05.2020 10:11:00.000,8941.2,8946,8929.5,8943.3,112200
18.05.2020 10:13:00.000,8942.2,8949,8924.55,8927.5,129975
18.05.2020 10:15:00.000,8927.55,8935,8922,8922.5,76500
18.05.2020 10:17:00.000,8923.9,8926.25,8916,8921.35,122100
18.05.2020 10:19:00.000,8921.75,8934,8921.35,8928.2,71625
18.05.2020 10:21:00.000,8928.2,8934.7,8925.6,8932.45,42975
18.05.2020 10:23:00.000,8931.05,8935,8926.55,8933,40725
18.05.2020 10:25:00.000,8932.85,8942,8931.15,8933,44925
18.05.2020 10:27:00.000,8933,8939.85,8931.05,8933.6,36225
18.05.2020 10:29:00.000,8933.5,8936.75,8920.2,8921,68325
18.05.2020 10:31:00.000,8920.2,8923.8,8913.25,8919,75000
18.05.2020 10:33:00.000,8918.95,8921.25,8912.35,8916.6,81450
18.05.2020 10:35:00.000,8915,8918,8906,8906.6,92925
18.05.2020 10:37:00.000,8909.45,8924.5,8902.1,8916.85,105300
18.05.2020 10:39:00.000,8917.85,8920,8912,8914.25,36750
18.05.2020 10:41:00.000,8914.9,8917.3,8910.6,8916.95,35175
18.05.2020 10:43:00.000,8916,8920.35,8910.7,8913.75,48975
18.05.2020 10:45:00.000,8913.4,8913.4,8865.55,8866.15,410625
18.05.2020 10:47:00.000,8862.65,8879.8,8859.25,8879,194400
18.05.2020 10:49:00.000,8881.45,8881.45,8860,8872.35,136950
18.05.2020 10:51:00.000,8872.1,8878.7,8861.55,8868.05,83400
18.05.2020 10:53:00.000,8867.9,8876.95,8863.8,8869.4,90675
18.05.2020 10:55:00.000,8868,8870.55,8842.85,8856,208050
18.05.2020 10:57:00.000,8855,8858.65,8840,8858.15,131175
18.05.2020 10:59:00.000,8858.7,8859.05,8851,8853.6,81075
18.05.2020 11:01:00.000,8855,8855,8837.45,8854.35,117975
18.05.2020 11:03:00.000,8854.6,8862.7,8851.55,8860,76200
18.05.2020 11:05:00.000,8861.7,8867.5,8853.05,8865.75,75450
18.05.2020 11:07:00.000,8865,8869.35,8855.35,8856.25,71850
18.05.2020 11:09:00.000,8860.95,8861.6,8831,8836.95,130800
18.05.2020 11:11:00.000,8835.7,8848.45,8834,8841.4,103800
18.05.2020 11:13:00.000,8844,8855,8842.8,8853.85,65700
18.05.2020 11:15:00.000,8852.95,8853.85,8844,8852,55275
18.05.2020 11:17:00.000,8852,8854.85,8844.35,8847.9,61275
18.05.2020 11:19:00.000,8847.5,8850.75,8835.05,8840,85350
18.05.2020 11:21:00.000,8839,8843.25,8832,8832,70275
18.05.2020 11:23:00.000,8832,8839,8822.85,8827.35,155925
18.05.2020 11:25:00.000,8827.7,8833.9,8822.1,8826,82725
18.05.2020 11:27:00.000,8826,8838.65,8825,8835,63225
18.05.2020 11:29:00.000,8834.15,8845.35,8834.15,8837.9,97125
18.05.2020 11:31:00.000,8840.95,8853.55,8836,8848.15,94725
18.05.2020 11:33:00.000,8849.95,8858.2,8846.7,8852.2,104550
18.05.2020 11:35:00.000,8853.45,8865.95,8851.95,8853.65,143475
18.05.2020 11:37:00.000,8855,8868.4,8850.05,8863.85,79800
18.05.2020 11:39:00.000,8862.05,8863,8851.3,8851.4,51375
18.05.2020 11:41:00.000,8851.1,8863.6,8848.15,8861.55,57900
18.05.2020 11:43:00.000,8863.9,8868.45,8858,8859.3,61875
18.05.2020 11:45:00.000,8858.15,8873.4,8855,8864.15,80925
18.05.2020 11:47:00.000,8864.5,8866,8857.1,8866,51375
18.05.2020 11:49:00.000,8866.4,8868,8859.85,8861.95,37500
18.05.2020 11:51:00.000,8861.95,8862.55,8856.05,8862.55,37200
18.05.2020 11:53:00.000,8863,8879.25,8860.5,8875.8,114300
18.05.2020 11:55:00.000,8873.1,8874.8,8867,8870.9,56100
18.05.2020 11:57:00.000,8865.6,8871,8862.9,8862.9,37275
18.05.2020 11:59:00.000,8862.9,8874.9,8862.75,8871,33000
18.05.2020 12:01:00.000,8870.5,8879,8870.2,8872.8,74475
18.05.2020 12:03:00.000,8874,8881,8869,8872.9,84975
18.05.2020 12:05:00.000,8872,8883.15,8871.05,8879.4,68925
18.05.2020 12:07:00.000,8879.25,8882,8871.55,8873,36750
18.05.2020 12:09:00.000,8872,8874.95,8865.25,8868.15,64050
18.05.2020 12:11:00.000,8868.15,8869.3,8860.9,8861,63150
18.05.2020 12:13:00.000,8861,8866,8858.45,8864.65,45750
18.05.2020 12:15:00.000,8864.65,8864.65,8858,8861.9,58500
18.05.2020 12:17:00.000,8864.45,8871.35,8861,8870,36975
18.05.2020 12:19:00.000,8872,8872,8860.05,8861.95,26475
18.05.2020 12:21:00.000,8861.95,8865.65,8858,8859.2,29475
18.05.2020 12:23:00.000,8859.4,8869,8857.25,8863.1,35625
18.05.2020 12:25:00.000,8863.1,8865,8858.05,8863.75,14550
18.05.2020 12:27:00.000,8863.75,8872.5,8860.65,8866.85,48825
18.05.2020 12:29:00.000,8865.55,8875.65,8863.65,8869.9,64725
18.05.2020 12:31:00.000,8871.05,8878.75,8868.1,8878,50700
18.05.2020 12:33:00.000,8876.4,8897,8875.3,8892.55,216225
18.05.2020 12:35:00.000,8893.75,8897.6,8887,8887.2,116925
18.05.2020 12:37:00.000,8888,8890.25,8881.35,8884.1,90675
18.05.2020 12:39:00.000,8885.95,8895,8884.05,8894.55,75525
18.05.2020 12:41:00.000,8894.4,8895,8883.15,8886,59400
18.05.2020 12:43:00.000,8884.45,8897.8,8882,8897.8,47400
18.05.2020 12:45:00.000,8896.9,8913.3,8894.1,8902.3,222000
18.05.2020 12:47:00.000,8902.2,8906.15,8892,8895.95,71100
18.05.2020 12:49:00.000,8895.75,8897.95,8883.05,8886.15,63975
18.05.2020 12:51:00.000,8886.75,8893,8884,8888.5,75300
18.05.2020 12:53:00.000,8888.95,8896,8886.15,8890.05,44775
18.05.2020 12:55:00.000,8889.9,8896,8886,8888.8,33825
18.05.2020 12:57:00.000,8887.35,8890,8876.65,8883,69075
18.05.2020 12:59:00.000,8884,8886.4,8880,8884.45,45825
18.05.2020 13:01:00.000,8884.45,8892,8882.1,8891.55,49950
18.05.2020 13:03:00.000,8890,8891.55,8882.25,8887.2,27750
18.05.2020 13:05:00.000,8887.2,8890.95,8866.3,8868.45,77100
18.05.2020 13:07:00.000,8866.35,8875,8866.35,8873.7,66075
18.05.2020 13:09:00.000,8873.7,8873.7,8864.1,8870.05,66225
18.05.2020 13:11:00.000,8870.05,8872.45,8866.5,8868.6,43425
18.05.2020 13:13:00.000,8868.6,8878.05,8866.4,8876.35,58800
18.05.2020 13:15:00.000,8878.1,8878.45,8862,8866,52725
18.05.2020 13:17:00.000,8863.55,8870,8861.6,8867.05,49125
18.05.2020 13:19:00.000,8869,8872.65,8866,8869.5,53850
18.05.2020 13:21:00.000,8868.8,8872.75,8858.75,8858.75,82275
18.05.2020 13:23:00.000,8858,8865.95,8858,8860.55,58050
18.05.2020 13:25:00.000,8860.1,8865.55,8858.2,8858.2,51450
18.05.2020 13:27:00.000,8858.5,8860,8844.75,8847,179025
18.05.2020 13:29:00.000,8848.2,8851.5,8825,8832.7,213600
18.05.2020 13:31:00.000,8832.45,8845.95,8827,8840.7,125775
18.05.2020 13:33:00.000,8842.45,8848.8,8835.95,8847.3,73050
18.05.2020 13:35:00.000,8847,8865.8,8846,8865.8,119625
18.05.2020 13:37:00.000,8865.65,8867.8,8855,8858.4,45675
18.05.2020 13:39:00.000,8858.65,8865,8853,8856,51375
18.05.2020 13:41:00.000,8857.9,8862.95,8854,8855.6,42300
18.05.2020 13:43:00.000,8855.6,8858.85,8848.25,8853.4,50475
18.05.2020 13:45:00.000,8852.25,8877.75,8852.25,8877.75,82275
18.05.2020 13:47:00.000,8876.1,8897,8874.85,8884.95,210675
18.05.2020 13:49:00.000,8884.55,8903,8883.25,8901.75,130125
18.05.2020 13:51:00.000,8901.75,8901.75,8882,8882.7,70950
18.05.2020 13:53:00.000,8882.45,8895,8880,8893.05,71475
18.05.2020 13:55:00.000,8893,8914.5,8893,8894.95,217200
18.05.2020 13:57:00.000,8893.1,8911,8893.1,8904,97275
18.05.2020 13:59:00.000,8901.85,8906.55,8896.3,8896.3,89100
18.05.2020 14:01:00.000,8896.3,8896.3,8882.55,8885.85,99675
18.05.2020 14:03:00.000,8888.05,8890,8875.65,8885,83775
18.05.2020 14:05:00.000,8886.5,8895.1,8882,8886.45,54150
18.05.2020 14:07:00.000,8885.2,8902.55,8883,8897,68325
18.05.2020 14:09:00.000,8898.1,8904.55,8892.75,8902.8,51525
18.05.2020 14:11:00.000,8904.4,8917,8900,8905.9,153075
18.05.2020 14:13:00.000,8906.9,8908,8894.4,8894.4,74775
18.05.2020 14:15:00.000,8896,8904.5,8890,8891.15,67350
18.05.2020 14:17:00.000,8890,8891.15,8862.25,8868.65,192675
18.05.2020 14:19:00.000,8868.5,8880.55,8864.8,8876,89400
18.05.2020 14:21:00.000,8876,8879,8871.1,8875,41400
18.05.2020 14:23:00.000,8875,8889,8870.45,8884.65,63150
18.05.2020 14:25:00.000,8885,8889,8878.6,8883,52275
18.05.2020 14:27:00.000,8883,8899,8883,8893.85,74025
18.05.2020 14:29:00.000,8893.7,8896,8882.1,8883,65175
18.05.2020 14:31:00.000,8882.55,8897,8882.55,8891.1,75900
18.05.2020 14:33:00.000,8891.7,8893,8874.75,8876.1,81300
18.05.2020 14:35:00.000,8875.85,8875.85,8865.4,8868.1,151800
18.05.2020 14:37:00.000,8868.05,8874.85,8863.65,8869.75,78300
18.05.2020 14:39:00.000,8869.75,8885,8868.25,8883.8,62100
18.05.2020 14:41:00.000,8883.05,8884.05,8871.2,8878.55,37725
18.05.2020 14:43:00.000,8878.55,8878.55,8865.6,8869,45825
18.05.2020 14:45:00.000,8869,8869.4,8845.55,8859.5,207300
18.05.2020 14:47:00.000,8859,8868,8852.05,8863.1,119550
18.05.2020 14:49:00.000,8863.75,8866.75,8857.3,8860.9,43275
18.05.2020 14:51:00.000,8860.9,8868,8852.2,8868,69825
18.05.2020 14:53:00.000,8868,8879.65,8866.1,8866.1,90375
18.05.2020 14:55:00.000,8867.5,8870.6,8858,8859.45,55050
18.05.2020 14:57:00.000,8859.45,8864,8852.85,8856,80100
18.05.2020 14:59:00.000,8856,8860,8843.3,8845,126375
18.05.2020 15:01:00.000,8845,8845,8820.6,8826.1,266775
18.05.2020 15:03:00.000,8825,8835,8819.05,8825.5,143325
18.05.2020 15:05:00.000,8825.45,8825.45,8811.05,8821.75,185475
18.05.2020 15:07:00.000,8821.7,8832.85,8820.35,8832.85,146400
18.05.2020 15:09:00.000,8833,8835,8817.05,8817.85,145050
18.05.2020 15:11:00.000,8818,8826.1,8813.35,8826.1,186600
18.05.2020 15:13:00.000,8824.7,8828.65,8817.15,8826,122325
18.05.2020 15:15:00.000,8828,8829.7,8817.15,8818.45,142275
18.05.2020 15:17:00.000,8818.4,8823.15,8813.55,8823.15,156225
18.05.2020 15:19:00.000,8824,8829.95,8820.55,8826.2,207900
18.05.2020 15:21:00.000,8826.6,8830,8820.15,8824.55,164775
18.05.2020 15:23:00.000,8824.55,8832.7,8824.55,8832.7,175725
18.05.2020 15:25:00.000,8832,8832.25,8825.15,8826.7,208650
18.05.2020 15:27:00.000,8827.45,8829.8,8825.3,8829.2,143850
18.05.2020 15:29:00.000,8829.35,8830.75,8826.8,8829.5,90750
19.05.2020 09:15:00.000,8971,8971,8885.5,8888.3,750225
19.05.2020 09:17:00.000,8889.95,8926.65,8889.05,8922.05,425550
19.05.2020 09:19:00.000,8921.85,8947,8921.35,8941.45,390975
19.05.2020 09:21:00.000,8939.7,8945,8923,8930.8,295350
19.05.2020 09:23:00.000,8930,8941,8908.2,8911.95,280425
19.05.2020 09:25:00.000,8910.65,8913.5,8895.3,8897.4,294750
19.05.2020 09:27:00.000,8897.15,8910,8889.45,8890.7,222525
19.05.2020 09:29:00.000,8891.15,8901.4,8860.2,8860.2,325875
19.05.2020 09:31:00.000,8860.1,8879.1,8860.1,8871.65,237000
19.05.2020 09:33:00.000,8869.15,8888,8861.5,8887.05,224175
19.05.2020 09:35:00.000,8887.55,8906.2,8887,8898.25,233775
19.05.2020 09:37:00.000,8900,8903.75,8888.85,8897.55,143925
19.05.2020 09:39:00.000,8898,8931.7,8898,8923,315675
19.05.2020 09:41:00.000,8920.6,8945.85,8920.05,8936.1,260700
19.05.2020 09:43:00.000,8936.55,8942.75,8928.9,8932.2,146175
19.05.2020 09:45:00.000,8934.25,8956.3,8934,8953.15,298125
19.05.2020 09:47:00.000,8953.85,8955,8935.2,8942.65,142350
19.05.2020 09:49:00.000,8942,8978.25,8940,8968,404325
19.05.2020 09:51:00.000,8967.95,8975.45,8962.75,8962.75,208125
19.05.2020 09:53:00.000,8962.55,8974.65,8951.1,8974.65,153525
19.05.2020 09:55:00.000,8976.25,8978,8961.35,8964.75,121650
19.05.2020 09:57:00.000,8964.1,8972.25,8961.6,8964.1,103950
19.05.2020 09:59:00.000,8966,8967.85,8953.4,8955.1,100425
19.05.2020 10:01:00.000,8956.2,8963.1,8946.1,8963.1,128100
19.05.2020 10:03:00.000,8962.3,8988,8962.1,8986.1,293550
19.05.2020 10:05:00.000,8987.6,8992.2,8978,8979.15,185100
19.05.2020 10:07:00.000,8980.85,8985.05,8974.1,8979.2,83475
19.05.2020 10:09:00.000,8982,8987.9,8979,8983.05,107400
19.05.2020 10:11:00.000,8982.8,8985.3,8969.8,8971.8,102825
19.05.2020 10:13:00.000,8972.45,8979.25,8970.7,8971.6,65550
19.05.2020 10:15:00.000,8971.75,8993,8970,8991.65,145050
19.05.2020 10:17:00.000,8991.6,9000,8987.85,8998.25,194850
19.05.2020 10:19:00.000,8999,9009.6,8995,9000,252450
19.05.2020 10:21:00.000,9000.45,9002.25,8992,8993.7,102600
19.05.2020 10:23:00.000,8994.05,8998,8990.45,8996.6,112500
19.05.2020 10:25:00.000,8997,9024,8996.4,9013,311775
19.05.2020 10:27:00.000,9014.85,9028.8,9013.65,9028.1,170250
19.05.2020 10:29:00.000,9027.8,9029.85,9012,9013.7,141900
19.05.2020 10:31:00.000,9013.7,9024.65,9012.05,9017.05,114600
19.05.2020 10:33:00.000,9017.9,9025,9015.7,9019.9,72525
19.05.2020 10:35:00.000,9021.05,9034.5,9020.8,9026.55,161100
19.05.2020 10:37:00.000,9025.55,9027,9012.85,9014.85,142275
19.05.2020 10:39:00.000,9015.05,9019.4,9008.5,9017.85,105525
19.05.2020 10:41:00.000,9018.9,9019.65,9012.05,9016.05,58050
19.05.2020 10:43:00.000,9016.05,9027.7,9014.1,9023.5,94800
19.05.2020 10:45:00.000,9024.1,9024.1,9011.05,9012.9,86100
19.05.2020 10:47:00.000,9013.65,9029,9004,9023.45,120825
19.05.2020 10:49:00.000,9022,9033.05,9021.2,9030,91875
19.05.2020 10:51:00.000,9030.9,9033.1,9021.25,9023.05,74850
19.05.2020 10:53:00.000,9023.1,9031.65,9021,9021.85,66375
19.05.2020 10:55:00.000,9020.75,9023.35,9010.55,9010.55,90075
19.05.2020 10:57:00.000,9010,9030,9009.9,9025,100425
19.05.2020 10:59:00.000,9025.9,9032,9022.3,9023.65,68100
19.05.2020 11:01:00.000,9023,9023.65,9012.15,9014.3,72225
19.05.2020 11:03:00.000,9012.9,9016,8996.55,9002.25,160425
19.05.2020 11:05:00.000,9002.5,9002.5,8973,8975.3,273300
19.05.2020 11:07:00.000,8975.85,8984.25,8966.5,8968.1,181800
19.05.2020 11:09:00.000,8969.45,8981.35,8969.45,8974.9,123750
19.05.2020 11:11:00.000,8975.05,8979.9,8958.3,8960.65,162675
19.05.2020 11:13:00.000,8960.8,8966.6,8953.7,8964.55,181125
19.05.2020 11:15:00.000,8967.7,8976,8960,8975,114300
19.05.2020 11:17:00.000,8974.6,8976,8952.3,8952.3,99825
19.05.2020 11:19:00.000,8950.85,8956.7,8935.65,8955.05,255225
19.05.2020 11:21:00.000,8955.2,8957.8,8946,8948,81825
19.05.2020 11:23:00.000,8949.85,8962.9,8947.65,8960.4,68025
19.05.2020 11:25:00.000,8961,8971.55,8960.1,8968.7,89700
19.05.2020 11:27:00.000,8966.6,8972.9,8960,8960.2,56700
19.05.2020 11:29:00.000,8960,8960.2,8947.35,8947.35,73050
19.05.2020 11:31:00.000,8948.75,8959.3,8947.6,8957.05,54600
19.05.2020 11:33:00.000,8961,8972.35,8958.9,8965.2,73425
19.05.2020 11:35:00.000,8963.25,8966.15,8955.05,8966,30675
19.05.2020 11:37:00.000,8967.4,8974.4,8965,8971,48825
19.05.2020 11:39:00.000,8970.1,8983.95,8967.25,8983.95,101250
19.05.2020 11:41:00.000,8983.35,8984.4,8975.25,8979.9,69525
19.05.2020 11:43:00.000,8979.9,8986.3,8977.1,8980.1,87600
19.05.2020 11:45:00.000,8981.8,8982,8971.4,8979.45,49050
19.05.2020 11:47:00.000,8979.45,8992.15,8979.45,8992.15,93075
19.05.2020 11:49:00.000,8992.7,8992.7,8983.2,8987.7,64875
19.05.2020 11:51:00.000,8987.25,8990,8980.25,8981,40200
19.05.2020 11:53:00.000,8981,8990,8980.7,8987.85,36675
19.05.2020 11:55:00.000,8986.6,8999.95,8986.6,8995.85,91350
19.05.2020 11:57:00.000,8992.65,9005.95,8992.5,9001.1,97425
19.05.2020 11:59:00.000,9000.5,9003.3,8995,8995.15,50700
19.05.2020 12:01:00.000,8995.95,9004,8991.4,9002.35,65625
19.05.2020 12:03:00.000,9000.35,9004,8998.05,9001,80250
19.05.2020 12:05:00.000,9001,9002,8990.5,8992.7,71400
19.05.2020 12:07:00.000,8993.45,8994.15,8985,8985,81000
19.05.2020 12:09:00.000,8985.05,8989.35,8982.5,8982.5,50100
19.05.2020 12:11:00.000,8982.5,8984.6,8977,8980.55,58500
19.05.2020 12:13:00.000,8980.55,8991.45,8978,8991.45,51675
19.05.2020 12:15:00.000,8990.35,8991.5,8981.45,8983.8,54075
19.05.2020 12:17:00.000,8983.8,8989.9,8980,8989.65,23700
19.05.2020 12:19:00.000,8987.05,9000.1,8987.05,8996,68100
19.05.2020 12:21:00.000,8996.5,9011,8995,9008.4,105750
19.05.2020 12:23:00.000,9008.45,9009.05,9000,9000.15,77700
19.05.2020 12:25:00.000,9000.4,9003.1,8995,9000,63900
19.05.2020 12:27:00.000,9000,9010,9000,9006.1,66675
19.05.2020 12:29:00.000,9007.6,9007.6,8992,8992.5,68175
19.05.2020 12:31:00.000,8992.5,8994.4,8984.15,8987.7,75525
19.05.2020 12:33:00.000,8987.1,8989.95,8985,8985.35,53475
19.05.2020 12:35:00.000,8984,8986.3,8974.05,8983,116025
19.05.2020 12:37:00.000,8983,8987,8980,8984,43275
19.05.2020 12:39:00.000,8984.55,8984.55,8970,8972.1,106125
19.05.2020 12:41:00.000,8971.2,8981.05,8967.4,8980.95,60075
19.05.2020 12:43:00.000,8980.9,8983.4,8970,8971.75,37650
19.05.2020 12:45:00.000,8973,8982.95,8970.05,8982.95,42150
19.05.2020 12:47:00.000,8983,8992.8,8981.65,8989,73050
19.05.2020 12:49:00.000,8989,8991.9,8982,8985.55,27900
19.05.2020 12:51:00.000,8984.15,8991.4,8980.5,8986.35,27825
19.05.2020 12:53:00.000,8986.25,8986.25,8969,8970.5,68550
19.05.2020 12:55:00.000,8969.9,8972.1,8956.25,8967.45,133800
19.05.2020 12:57:00.000,8965.4,8970,8960,8962.2,58575
19.05.2020 12:59:00.000,8962.2,8962.2,8946,8948,134775
19.05.2020 13:01:00.000,8948.8,8958,8942.25,8956.8,110325
19.05.2020 13:03:00.000,8957.3,8960,8949,8949,54450
19.05.2020 13:05:00.000,8948.25,8950.1,8917.25,8920.9,294300
19.05.2020 13:07:00.000,8922.8,8932,8922.8,8930.5,132900
19.05.2020 13:09:00.000,8931,8935,8915,8919.3,103800
19.05.2020 13:11:00.000,8917.95,8938,8917,8935.5,93300
19.05.2020 13:13:00.000,8933,8942.9,8932,8939.25,82050
19.05.2020 13:15:00.000,8939,8948,8932.2,8945.35,73950
19.05.2020 13:17:00.000,8945,8950,8940,8945,72900
19.05.2020 13:19:00.000,8946,8960,8945,8949.7,77700
19.05.2020 13:21:00.000,8948.1,8954.3,8942.4,8942.4,41250
19.05.2020 13:23:00.000,8942.4,8943.9,8928.9,8932.6,76500
19.05.2020 13:25:00.000,8932.55,8937,8927.85,8933,68625
19.05.2020 13:27:00.000,8933,8945,8932.6,8937,40125
19.05.2020 13:29:00.000,8936.45,8939.85,8927.55,8934.6,40950
19.05.2020 13:31:00.000,8934.6,8946.55,8934.6,8938.15,43725
19.05.2020 13:33:00.000,8938.95,8938.95,8912,8913.75,114900
19.05.2020 13:35:00.000,8913.55,8921.15,8902.5,8911.9,195075
19.05.2020 13:37:00.000,8910.1,8914.4,8895.05,8896.8,216300
19.05.2020 13:39:00.000,8896,8906,8888.85,8894.65,181275
19.05.2020 13:41:00.000,8896,8900,8877.1,8879.3,180000
19.05.2020 13:43:00.000,8879.85,8902.95,8875.2,8900.7,150450
19.05.2020 13:45:00.000,8897.7,8900.7,8877.9,8880,131925
19.05.2020 13:47:00.000,8881,8888,8879.5,8887.4,78825
19.05.2020 13:49:00.000,8886.1,8913.9,8886.1,8903.05,134025
19.05.2020 13:51:00.000,8903.75,8903.75,8880.05,8880.05,84600
19.05.2020 13:53:00.000,8881.3,8882.7,8866.55,8872,145275
19.05.2020 13:55:00.000,8870.6,8878.3,8859.05,8872,161775
19.05.2020 13:57:00.000,8870,8879,8861.75,8875.25,88575
19.05.2020 13:59:00.000,8875.1,8893.55,8874,8893.15,109200
19.05.2020 14:01:00.000,8893.65,8893.65,8877.45,8879,71475
19.05.2020 14:03:00.000,8879.7,8889.85,8873.15,8886.45,59250
19.05.2020 14:05:00.000,8888.1,8889,8867,8870.25,95850
19.05.2020 14:07:00.000,8869.15,8884.9,8865.1,8879,89475
19.05.2020 14:09:00.000,8878.4,8881.05,8863,8863.25,90450
19.05.2020 14:11:00.000,8863,8868.3,8852.6,8865,182475
19.05.2020 14:13:00.000,8867.85,8882,8865,8875.1,136650
19.05.2020 14:15:00.000,8874.1,8895.55,8868,8893.5,132450
19.05.2020 14:17:00.000,8893.7,8898.65,8887,8898.65,132000
19.05.2020 14:19:00.000,8897.95,8923,8897.95,8915.95,248550
19.05.2020 14:21:00.000,8915.05,8917.15,8895.6,8897.55,124500
19.05.2020 14:23:00.000,8897.85,8914.8,8895.6,8914.1,114375
19.05.2020 14:25:00.000,8910.05,8912.95,8905,8906.8,66000
19.05.2020 14:27:00.000,8906.8,8918.7,8902.15,8915.5,76725
19.05.2020 14:29:00.000,8914,8920,8900,8901.6,74250
19.05.2020 14:31:00.000,8901.9,8908.15,8890.15,8894,82575
19.05.2020 14:33:00.000,8894.65,8904.5,8888,8889.9,74025
19.05.2020 14:35:00.000,8890.2,8900.1,8888.1,8899.6,41325
19.05.2020 14:37:00.000,8899.6,8909.45,8897.45,8905,72000
19.05.2020 14:39:00.000,8904.05,8905,8883.35,8883.55,68475
19.05.2020 14:41:00.000,8884,8888.15,8881.6,8884.6,79050
19.05.2020 14:43:00.000,8884.75,8898.1,8884.35,8895.25,67425
19.05.2020 14:45:00.000,8895.25,8900,8890.05,8892.9,36450
19.05.2020 14:47:00.000,8893,8898.7,8883.45,8896.95,54900
19.05.2020 14:49:00.000,8897,8907.7,8890,8890,88650
19.05.2020 14:51:00.000,8890,8899.95,8885,8890.85,89250
19.05.2020 14:53:00.000,8890.85,8894.3,8885.4,8888.15,62400
19.05.2020 14:55:00.000,8887.05,8887.2,8865.9,8868,143175
19.05.2020 14:57:00.000,8868,8880.3,8865.55,8880.3,69225
19.05.2020 14:59:00.000,8880.25,8883.2,8860.45,8863.3,125100
19.05.2020 15:01:00.000,8863.55,8880.9,8863.55,8880,103725
19.05.2020 15:03:00.000,8878.2,8887.65,8878,8887.65,102975
19.05.2020 15:05:00.000,8887.25,8887.3,8876.8,8876.8,48825
19.05.2020 15:07:00.000,8876.7,8879.6,8873,8878,59100
19.05.2020 15:09:00.000,8878.05,8884,8874.05,8875,90300
19.05.2020 15:11:00.000,8875,8884.2,8874.05,8883.45,75375
19.05.2020 15:13:00.000,8883.45,8895,8883,8888.7,98175
19.05.2020 15:15:00.000,8888.9,8892,8881,8886.05,96900
19.05.2020 15:17:00.000,8885.3,8889,8883,8886,63450
19.05.2020 15:19:00.000,8886,8893.5,8884.75,8890.05,83550
19.05.2020 15:21:00.000,8889.8,8894.6,8884.6,8887.9,95475
19.05.2020 15:23:00.000,8887.9,8893.9,8886.65,8892.9,91725
19.05.2020 15:25:00.000,8892.05,8893,8887.5,8889.65,91125
19.05.2020 15:27:00.000,8889.9,8891.85,8888.65,8890.25,112050
19.05.2020 15:29:00.000,8891.1,8892.85,8890,8891,53625][1]

enter image description here

python pandas matplotlib python-3.6
1个回答
0
投票

我通过添加plt.clf()来纠正它>

© www.soinside.com 2019 - 2024. All rights reserved.