programming forums Java Java JSRs Mobile Certification Databases Caching Books Engineering OS Languages Paradigms IDEs Build Tools Frameworks Products This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Sheriffs:
Saloon Keepers:
Bartenders:

# how to graph in java

john roble
Greenhorn
Posts: 3
Hey guys i have this program

i want to make a graph of manchester encoding using the equivalent binary values is it possible in java? Help please

Paul Clapham
Sheriff
Posts: 22835
43
• 1
Is it possible? Quite likely. First you would have to decide what you want the graph to look like, where you want it to appear (and so on). For example were you thinking of a nice drawing with curving lines or a crude array of * characters or what? Let's start with that, and then we can get into how to figure out where the nice line or crude array or whatever goes.

Campbell Ritchie
Marshal
Posts: 56578
172
• 1
And welcome to the Ranch

Please explain what Manchester encoding is; I am not familiar with that term. (Or supply a link).
Avoid Math.pow(x, 2) if possible. Use x * x instead. Please explain what your binary to decimal and ASCII methods are doing; since a char is a number representing the ASCII value in binary already, and numbers are stored in binary, can you use simpler conversions? Have you come across methods like this one which might do what you want?

john roble
Greenhorn
Posts: 3
Campbell Ritchie wrote:And welcome to the Ranch

Please explain what Manchester encoding is; I am not familiar with that term. (Or supply a link).
Avoid Math.pow(x, 2) if possible. Use x * x instead. Please explain what your binary to decimal and ASCII methods are doing; since a char is a number representing the ASCII value in binary already, and numbers are stored in binary, can you use simpler conversions? Have you come across methods like this one which might do what you want?

I am not good in explaining so i think here's a better explanation of what manchester encoding is:  https://www.youtube.com/watch?v=XKtxxZ327UM
thanks for the tips though =D

john roble
Greenhorn
Posts: 3
Paul Clapham wrote:Is it possible? Quite likely. First you would have to decide what you want the graph to look like, where you want it to appear (and so on). For example were you thinking of a nice drawing with curving lines or a crude array of * characters or what? Let's start with that, and then we can get into how to figure out where the nice line or crude array or whatever goes.

https://www.youtube.com/watch?v=XKtxxZ327UM i want my graph to look like this is it possible how? what am i going to use? i'm not that good at java yet.

Tim Moores
Saloon Keeper
Posts: 4035
94
That looks like a non-standard graph, so if you want exactly that, you will likely have to program it yourself using the AWT or JavaFX API.

There are lots of free charting libraries available that you can use, see http://java-source.net/open-source/charting-and-reporting for a partial list.