Writting multiple sin wave plot

hi guys im new to influxdb, i was trying to generate a sin wave on influxdb, then i wonder if i could make multiple of it. here is my code:

from influxdb import InfluxDBClient

import time

import random

import math

USER = ‘root’

PASSWORD = ‘root’

DBNAME = ‘mydb’

HOST = ‘localhost’

PORT = 8086

dbclient = None;

def main():

dbclient = InfluxDBClient(HOST, PORT, USER, PASSWORD, DBNAME)

while True:
     for X in range(0, 360):
            sin = math.sin(X)
            data_point = getSensorData(sin)


            print("Written data" +str(sin))


def getSensorData(sin):
sensorData = sin

now = time.gmtime()

pointValues = [


      "time": time.strftime("%Y-%m-%d %H:%M:%S", now),

      "measurement": 'reading',

      "tags": {

          "nodeId": "node_1",


      "fields": {

          "sin value": sensorData





if name == ‘main’:

  1. You haven’t said what the problem is - what are we trying to help you deal

  2. Most sin() functions I’m familiar with expect the argument in radians, not
    degrees. Have you checked for this library?


thanks for the reply antony,
im just trying to write a python programm into influxdb which will display a sin wave on grafana, with code that iv shown is able to display a single sin wave, so i wonder if there is a way to display multiple sin waves on grafana by modifying the python code

Hello @yoshino1204,
You might find this useful: