plotting data

edited November 28 in Library Questions

Hello, I am a new one in programming and i would like your help.I want a code in processing i3 that could read a txt or csv file of data and make a real graph.Especcially to read ecg signals and make a cardiograph.Thanks a lot..

Tagged:

Answers

  • edited November 28

    Please check prev posts: https://forum.processing.org/two/search?Search=ECG

    Also provide the code you have so far. If you are looking for somebody to do the work for you, there is a section called Events & Opportunities.

    ****EDIT: Referring to jeremydouglass'es comment, here is one post for example: https://forum.processing.org/two/discussion/136/grafica-library#latest

    Kf

  • Also try scrolling through the last 2-3 search pages of a forum search for the grafica library:

    https://forum.processing.org/two/search?Search=grafica

  • i have learned hot to load and store a tsv or a csv file but i don't know how to plot in real time axis..What do you mean about the section '' Events & Opportunities''? @kfrajer

  • please show me a way or tell me a book that i can read to learn about plotting data..

  • It is not possible to know what level of Proceessing you have based on your post. If you provide some code of what you can do, then one could take it to the next step. If you are new in Processing, you can start by looking at the reference in the Processing's website. Check the following keywords: draw() and setup(). Then you should consider checking the example section in the same site, or the tutorials.

    If you want to something in the forum, it is better to do the search from google as the search feature in this forum is not robust.

    Kf

  • Re:

    i don't know how to plot in real time axis

    ...I don't think you actually looked at the posts I shared.

    https://jagracar.com/sketches/multiplePlots.php

    Move your mouse around and watch the "Mouse Position" sketch plot in real time.

  • edited November 30

    Ecg[] ecg; // A Table object Table table;

    void setup() { size(640, 360); loadData(); } void draw() { background(255); } void loadData() { // Load CSV file into a Table object table = loadTable("data.csv", "header"); ecg =new Ecg[table.getRowCount()]; //plot(ecg); //plot(ecg(20001:30000)); int rowCount = 0; for (TableRow row : table.rows()) { // You can access the fields via their column name (or index) float x = row.getFloat("x"); float y = row.getFloat("y"); ecg[rowCount] = new Ecg(x, y); rowCount++; }

  • Please format your code. Edit your post (gear on top right side of any of your posts), select your code and hit ctrl+o. Leave an empty line above and below your block of code. Details here: https://forum.processing.org/two/discussion/15473/readme-how-to-format-code-and-text

    Related to your data, do you want to plot all the data at once? Or in sections?

    I suggest you install the Graphica library (via Library Manager right inside the Processing IDE) and explore the provided examples. If you find an example that you think it does a good job, or an example that fits your vision, share it here and you will get more feedback. There is not enough information to provide you with any useful feedback because in your case, the "meat" is in the details.

    Kf

  • I want to plot all my data at once, to load a csv or tsv file with thousands of rows in toy axes...I have installed the grafica library and i tried the examples from the site and nothing..I have no result..

Sign In or Register to comment.