Найти - Пользователи
Полная версия: диаграмма отказывается слушаться
Начало » Центр помощи » диаграмма отказывается слушаться
1
criptoivan
Всем привет,
я не могу понять почему за место нескольких блоков диаграмма показывает только один большой прямоугольник.
Помогите пожалуйста разобраться

 # -*- coding: utf-8 -*-
import requests
import numpy as np
import matplotlib.pyplot as plt
 
URL = 'https://poloniex.com/public'
 
def public_method(**params):
    """
    holt die daten aus Poloniex. Typ dict
    Variablen für Funktion:
      command='returnLoanOrders', currency='LTC' -> gibt daten von Verleiverlauf für LTC
    """
    print(params)
    result = requests.get(URL, params=params)
    return result.json()
 
# Verlei-Daten aus Poloniex rausholen
date_lean_ltc = public_method(command='returnLoanOrders', currency='LTC')
offers = date_lean_ltc['offers']
 
rate = []
amount = []
range_min = []
range_max = []
 
for offer in offers:
    print(offer)
    rate.append(offer['rate'])
    amount.append(offer['amount'])
    range_min.append(offer['rangeMin'])
    range_max.append(offer['rangeMax'])
 
rate = np.array(rate, dtype=float)
amount = np.array(amount, dtype=float)
range_min = np.array(range_min, dtype=float)
range_max = np.array(range_max, dtype=float)
 
fig = plt.figure()
ax1 = fig.add_subplot(1,1,1)
#ax1.plot(rate[0:1], amount[0:1])
   
#ax1.plot(rate*100,amount,'ro')
#ax1.plot(rate*100,amount,'-')
ax1.bar(rate, amount)
plt.show()
criptoivan
Здесь все такие начинающие как я?
я гугель уже до того задолбал что он меня в яндекс отправляет
criptoivan
яндекс отправил на х..

Помогите пожалуйста!!!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB