Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

308
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda