Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

309
Visualizações
plot a circular graph in realtime nodejs and python

I am facing a challenge for creating a circular virtual chart recorder graph. Does anyone has any idea? Here is the example for the same image.

image: https://drtr5fjqqz6ee.cloudfront.net/uploads/fsi/article_image/image/1011/Chart_data.jpg

Also, I have tried achieving the same using python and matplotlib but I am not able to find a viable solution to do so for the live data and update. I am also facing the problem in converting the same into my needs. Here is the python plot and code:
enter image description here

import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as FuncAnimation
import time
from math import pi
ydata = [10,14,12,15,16,13,12,11]
xdata = [1,  1, 2, 3, 4, 5, 6, 7]

'''
plt.plot(xdata, ydata)
plt.show()
new_data = {'x': [n * 2 * pi / data_len for n in range(data_len)] ,
            'y': [y/max_y*DESIRED_MAP_RADIUS for y in ydata]}
'''
t = 0
start_time = time.time()
while t < 30:
    end_time = time.time()
    t = end_time - start_time
    print(t)
    data_len = len(ydata)
    max_y = max(ydata)
    '''ydata = [random.choice(y_data) for i in range(data_len)]
    xdata = [random.choice(x_data) for i in range(data_len)]'''
    DESIRED_MAP_RADIUS = 10.0
    new_data = {'x': [n * 2 * pi / data_len for n in range(data_len)] ,
            'y': [y/max_y*DESIRED_MAP_RADIUS for y in ydata]}
            #print(new_data)

    ax = plt.subplot(111, projection='polar')
    ax.plot(new_data['y'], new_data['x'])
    ax.set_rmax(DESIRED_MAP_RADIUS)
    ax.set_rticks([2, 4, 6, 8,])  # less radial ticks but these are going to be ranging from  

0 to 1200 or 2000 ax.set_rlabel_position(-22.5) # get radial labels away from plotted line ax.grid(True) plt.plot(t,t,"g^") plt.show()

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda