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

255
Vistas
python agrega la figura de matplotlib en la página web

Ya he leído la siguiente función Call Python del código JavaScript

interpol.py

 import numpy as np from math import sqrt import matplotlib.pyplot as plt def interpol(x0, x, y): x = np.asfarray(x) y = np.asfarray(y) .... return f0 if __name__ == '__main__': x = [-5,-4.19,-3.54,-3.31,-2.56,-2.31,-1.66,-0.96,-0.22,0.62,1.21] y = [0.01,0.01,0.03,0.04,0.07,0.09,0.16,0.28,0.45,0.65,0.77] plt.scatter(x, y) x_new = np.linspace(-6, 2) plt.plot(x_new, interpol(x_new, x, y)) #output the figure plt.show()

Este código Python genera una figura.

Me gustaría obtener matrices x e y de html input y dárselas al código de python (en este ejemplo, uso x e y en python, pero me gustaría obtenerlas de html input ), y mostrar la figura de python en el página web.

Sé que tengo que usar un servidor y me gustaría usar jQuery.ajax() .

over 4 years ago · Santiago Trujillo
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