Results 1 to 3 of 3
  1. #1
    SuperJackson is offline Member
    Join Date
    Sep 2015
    Posts
    1
    Rep Power
    0

    Post How to plot a sine graph on java eclipse?

    Hi, I am totally new to Java/programming, and I am having a hard time to plot a graph of sine.
    How do I plot y=sinx or y=2*sin((pi/2)*x-2*pi)-2, for example, on java eclipse?
    Can somebody please explain it in a simple way?
    I really hope someone can help me!

    Thank you very much! :)

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: How to plot a sine graph on java eclipse?

    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    14

    Default Re: How to plot a sine graph on java eclipse?

    The easiest way (without using Graphics classes) is to print it vertically, using the value of y to print a single asterisk or some character on a line. The line numbers will be your x value. Since the sine can be negative, you have to take care of that too.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. How to plot a CCDF graph in Java?
    By nirath in forum New To Java
    Replies: 0
    Last Post: 12-05-2013, 07:20 AM
  2. How to plot graph in java mathematical equations
    By alphablitzer in forum New To Java
    Replies: 3
    Last Post: 06-05-2013, 02:44 PM
  3. How to plot graph in java for given samples
    By annesteve31 in forum New To Java
    Replies: 27
    Last Post: 11-29-2009, 09:27 PM
  4. i want plot realtime graph in java
    By santhosh_el in forum New To Java
    Replies: 3
    Last Post: 02-26-2009, 08:32 AM
  5. Plot 2D graph in Java from RS-232 data
    By spratana in forum Java 2D
    Replies: 4
    Last Post: 02-11-2009, 06:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •