Plotting points on a cartesian coordinate plane with given degree and distance

I just found it a moment ago.

Great. Please mark the thread "solved".

Once you have x and y as the values you want to plot just do

Serial.write('>'); // start marker
Serial.print(x);
Serial.write(','); // separator 
Serial.println(y); // end marker is the new line (CR LF)

Say x is 3 and y is 5, that will send the text in ascii >3,5CRLF over the serial line (or whatever protocol you can imagine)
Your Python code just needs to listen to incoming lines, and parse the message then plot it

There are many plotters written with Processing that you can explore. Here are a few first hits on Google
➜ https://wired.chillibasket.com/processing-grapher/
➜ https://docs.arduino.cc/built-in-examples/communication/Graph
➜ https://www.electroschematics.com/visualizing-data-arduino/
…

Writing something suited to your needs is not really hard

Solution to this question was using a library called plotter.

this is basic geometry and is pretty fundamental, you don't need a library

x = distance * cos(angle);     // angle from horizontal
y = distance * sin(angle);

This was not the question. I think OP made it clear a couple times he knew about this but he was looking at a way to plot a graph on the PC.

A link would go a long way to help the next reader of this post… (and help us understand what you ended up doing)

xgraph

This

may be what the OP found.

File under who knew? And thanks!

a7

Possibly. That uses Processing for the display part.

Thank you so much, this is incredibly helpful!

I took away that solution, it didn't seem to work

Did you install Processing on your PC?

I did, but it does not look like I can get anything besides a graph with a value over time

Indeed seems so from their doc they state

  • Continuous multi-variable plots against time
  • 2-variable "x" vs "y" plots

But you have source code so could possibly modify the behavior

I tried doing the xy plane, but it returns the same thing

Seems indeed it’s all time based as they say.

XY drawing is what you get for example with Lissajous curve - Wikipedia

I want an output that looks similar to this

I understand the empirical process and have certainly been disappointed by an Arduino library or two, but are you talking about the one I linked in #29?

It claims to do time and X/Y plotting.

a7

Yes, I am talking about that library, I tried it and it is giving me NaN on every point along the axis lines

Thassa shame. Are you positive you are using it correctly?

a7