Plotting a graph in java...is it possible?

hi evryone,
i have 100 values stored in an array and ive been looking at how i can display these
as they are constantly being updated.
can anyone help me in how i would go about plotting these integers as a simple dot graph?
thanks...any help is appreciated!
thanks again!

Use freechart. This is a really good program to generate the charts / graphs.
http://www.object-refinery.com/jfreechart/index.html

Similar Messages

  • Newbie for plot/draw graph in Java

    Hi everybody:
    I really need help from anyone of you who know the problem that i am facing now. I have all the data in an excel file (.xls). I would like to retireve all the data(all float integers in two coloumn and 300 rows) from this excel file and draw/plot out a graph based on the data in that excel file using java. Can i know how to do that? Is there any available package that i can use? I will be appreciate if there is some sample codes for me. Thank you.
    Serene

    http://jakarta.apache.org/poi/index.html
    http://www.jfree.org/jfreechart/

  • Is there any option to plot a graph in java if so get me a sample code

    its really urgent

    You really need to read the tutorial.
    You extend, let's say a JPanel and then override paintComponent method.
    This is a sample of one of my programs:
    public void paintComponent(Graphics g){
        if(notVisible) return;
        g.drawImage(image, x, y, w, h,null);
        if(beingDragged){
          g.setColor(Color.black);
          Graphics2D g2 = (Graphics2D)g;
          g2.setStroke(BorderLines.getStroke(BorderLines.DOTTED));
          g2.drawRect(tempX, tempY, tempW, tempH);
        if(!selected) return;
        g.setColor(Color.black);
        g.translate(x, y);
        int xMid=w/2-3;
        int yMid = h/2-3;
        g.setXORMode(Color.red);
    }As you can see in the method I use the object graphics to paint all that I want: images, lines, ....

  • Plotting graphs in Java

    Hi,
    I need to draw some graphs and display them on a JFrame. Are there any easy methods to plot a graph given the data?
    Any inputs are welcome.
    Thanks,
    Akhil

    Check out jfreechart: http://www.object-refinery.com/jfreechart/

  • How do I generate a graph in Java?

    I need to implement a graph in java or possibly create a graph in excel through java (if possible). any help would be greatly appreciated as i need to do this within about a week!

    Download JFreeChart and give it a try:
    http://www.object-refinery.com/jfreechart/index.html
    JFreeChart is distributed for free, including the complete source code (subject to the GNU LGPL).
    Regards,
    Dave Gilbert
    JFreeChart Project Leader

  • Problem With Plotting a graph

    Hi,
    I need help plotting a graph.
    The situation is .... I have data of speed against time. Data is like this : a truck runs at some speed until 10 o clock. Now the driver changes time of the speed vs. time tracking device back to 9 o clock. Now if I plot this data it becomes a invalid graph as between 9 - 10 I will be having two values for the speed.
    I thought of a solution that when ever a time change occurs I will drop the speed to 0 and again start plotting the graph with next point on the scale of x axis with the new set time ...... Is this possible ? 
    Please help.
    Thanks and regards
    Anirudh

    Hi,
    Here is a photo of what I want to do with the graph.
    Here as the values that i am mappinng on x axis are repeated the graph is not one to one. Now to make it look like a one to one i want to drop it zero at the first 6. the restart the scale after 6 as 5 and continue mapping. Is this possible ?? ?? 
    Thanks and Regards,
    Anirudh.
    Attachments:
    tr1.JPG ‏113 KB

  • Plot 4 Graphs with only 2 legends

    Hi!
    I have a graph in which I want to put 4 plots of defined color and line width, but in the Legend I want to show only 2 of them.
    I tried to define the plots and scaled the Legend with the mouse to the wanted first 2 plots. Unfortunately this setting isn't saved, when I close and reopen the vi.
    Next try was to define the plots at the start with property nodes. But when I set "Legend: Plots Shown" to 2, it's not possible to setup the third plot.
    Anybody an idea for a solution?
    Thank you in Advance.
       Hendrik alias XS-er
    PS: I'm using LabView 8.0
    Message Edited by XS-er on 05-17-2006 02:39 AM

    Graphs only save settings for the plots they have default data for at the time of saving.  So, if the default data for the graph has four traces, it will save info for four traces.  If it only has one trace, it will save info for one trace.  If you need to save data for plots, a more robust solution is to set the values using property nodes on the graph in the initialization section of your code.  That way you won't lose them.  Note that you cannot set properties on a trace which does not exist.  You will need to preload your graph with the number of traces you are using (I think you can use zero length traces).  If you stop using one of the traces, you can lose the information at run time.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Plotting a graph in netbeans

    Hello im using netbeans 4.1 to develop an interface for a project which will display a graph, is this possible? Does anyone know where i can get code on how to plot a graph to get me started?
    Any help would be great!
    Thanks

    Hello,
    You can design your own graph component by hand or you can use [url http://www.jfree.org/jfreechart/index.php]JFreeChart.

  • Plotting a graph in LabView

    Hi all,
    I am working on an application that connects to an SQL database. I've got the database set up alright and have got all of the connections to it working properly. I am able to extract the info from the database and display it in tables and multi-column list boxes on the front panel by use of SQL statements.
    Now I want to add a couple of graphs to the application that plot the data from these tables and list boxes as well some data straight from the SQL database. I also want to generate multiple plots on the same graph.
    For example, I have a table in the SQL database with three columns A, B and C.  I will have A on the x-axis, the y-axis will be a simple scale from 0 - 25 and I want to plot the data in both B and C against A on the same graph.
    Finally is it possible to label the x-axis using the values in column A or perhaps the points on the two plots of B and C.
    Any help will be greatly appreciated.
    Cheers.

    Something like this?
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal

  • Plotting a graph in real-time without reading from a file

    Hello there.
    I am trying to plot a graph. I have succeeded in plotting the graph by first writing the data to a text file (.TXT), then reading from that text file.
    However, I feel this method will take up a lot of memory. Thus, I was wondering whether it is possible to plot the graph directly without first writing it to a text file.
    Thanks a million.

    You can use a while loop with a shift register, inside the while loop, put a case structure, and in it, your data aquisition vi. When you get data, use the shift register to append data to the array, using build array (the shift register will go in as an array, and data as an element) just execute the appending state when data is present, and you'll have a real time graph.
    Hope this helps

  • Graphs in java swing

    hi,
    i am having some x and y values (or some function of x)and i would like to plot a graph between them.
    what is the best and simplest way to do it in java swing.
    thanx

    ...if you want to leave it simple, overwrite a custom JComponent's paintcomponent(Graphics) method and use the native drawing commands such as drawLine(...) and draw(Shape) (take a look at Graphics2D). If you are looking for a more sophisticated solution with professional graph packages i recommend JFreeChart (http://www.jfree.org). It is, however, a bit tricky to use, not suitable if you just begun working with java.

  • How to plot XY graph from 2 input of dynamic array ? ...

    I have 2 problem when I plot XY graph with 2 dynamic array :
    - I want to make the graph look like sweep chart. But it's seem not possible to use waveform graph?
    - The graph shoul move from left to right , then right to left, then left to right,.....
    Any one can give me some hints?  Thanks alot.
    Attachments:
    U1.PNG ‏21 KB
    XY radom value input.vi ‏147 KB

    I have to make Y change  from 0-10, then 10-0,.... Any one can help me to make it better?
    - How I shift the graph?
    Attachments:
    working_increse_decrease.vi ‏20 KB

  • Plotting Category Graph in DIADEM

    Hello All
               I have a basic question in DIADEM 10.2 since I am new to this software. I want to plot a category vs value graph in DIADEM.
    In more clarity, data type of X axis should be in Text and Y axis should be in Numeric data type. Is it  possible in DIADEM or any other alternative way to plot such graph?. If question is already answered in forum please send me the link. The example plot shown below will picturize my requirement..
    Thanks in Advance ...
    Kind Regards
    Rigil kumar
    Solved!
    Go to Solution.

    Hi Rigil,
    DIAdem can do this, though it's not obvious unless you know where to look.  Actually in DIAdem 11.0 and beyond (which goes Beta on April 1, 2008) you can just drag the text channel and the numeric channel onto a new graph.  In prior versions you need to drag the numeric channel by itself onto the graph-- this will plot the numeric channel against its index (1, 2, 3, ...).  You then configure this curve to display vertical bars.  Then you need to drag the same numeric channel onto the graph again, and this time configure this second curve to be "Line and symbol".  Look in the "Curve parameters" dialog of this second curve, select the "Labels" tab, then the "Text" tab, then check the "From channel" checkbox and select the text channel to pull the X axis labels from.  You then need to click on the "Position" tab and choose "At the X coordinate of the curve point with a fixed Y position".  Finally I'd suggest setting the Y offset to -5 (vertical offset, measured in %, relative to the X axis).
    Whew!  You can see why we wanted to make that easier.  Here's an example that does this and also rearranges the numeric values in descending order, as they appear on your graph.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Pareto Text Chart.zip ‏20 KB

  • Plotting a graph and then exporting as a gif or jpeg  ??

    I need to retrieve certain data from a database table and then plot a graph. Which needs to show up in a jsp.
    can anyone possibly think of any ay I could do this ?
    thanx !

    Sure. Download an open source chart library.
    The one I'm working on is JFreeChart (http://www.jrefinery.com/jfreechart) but on my website there are some links to others also.
    Regards,
    David Gilbert.

  • Turn off a single plot of a multiple plot waveform graph

    I have a multiple plot waveform graph (4 plots). I want to turn off one of the plots, say plot 2. Is this posible from the graphs property node? The property node seems to only give a reference to plot 0. I am using labview 7.
    Cheers,
    Wayne

    I think you can use "active plot" together with "plot.visible"
    property node to control which one you'd like to display. By default,
    the property node refers to plot 0, but you can change to plot 1 or
    other plots by changing active plot property node. You can search
    "Plot" in LabVIEW Help if you'd like to know details.
    Good luck,
    Jian
    On 18 Feb 2004 03:28:49 GMT, [email protected] (Computerman74)
    wrote:
    >>
    >>I have a multiple plot waveform graph (4 plots). I want to turn off
    >>one of the plots, say plot 2. Is this posible from the graphs
    >>property node? The property node seems to only give a reference to
    >>plot 0. I am using labview 7.
    >>Cheers,
    >>Wayne
    >>
    >>
    >>
    >>
    >>
    >>
    >
    >I would love to know if this is possible. I have been trying to figure i
    t out
    >myself.
    >There is a way to turn a single array off and that is what I am doing for now
    >untill this is possible. The plot is still there but reads zero when tunred
    >off. It would be cool to have the abillty to turn off a single plot.
    >I have tryed all the property nodes with no luck. The answer may be in the
    >array size but I can't seem to control that either.
    >For now you can use wire all 4 channels using the comparison select. Use a
    >constant of 0 And wire up a swtich. When the input is false the output is zero
    >in effect making the plot inactive but it still there.

Maybe you are looking for

  • User Decision step- Upon reject, auto-popup text for reason

    In a user decision step, when the user clicks the reject button, open text for rejection reason within the workitem. i have done the following 1) Create a new step 2) Create a task based on SOFM.CREATE 3) Binded  WIOBJECT_ID => (append table) ADHOCOB

  • Transferring from 1st generation iphone to iphone 3gs

    Im selling my 1st generation iphone and buying a 3gS, possibly all in the same day. But i just want to know how long it will take to get my phone number transferred to the new 3gs and how soon i will be receiving calls on there?? Is there a waiting p

  • Install of second HD pushing fan hard.

    I have a G5 Dual 1.8, the one with 8GB RAM capicity not the 4GB one. Just got a Seagate 7200.10 500GB HD and installed it. As soon as the computer is turned on the power supply fan seems to be spinning at full throttle. It's the fan up top between th

  • My screen goes from large to small in safari. also disappears than comes back. goes to desktop and then comes back.

    I am having an issue when using safari. My screen goes from really large to normal. The screen also disappears and I get to the desktop with the small screens on top. Then I get the dock (I believe) with the calendar, time, weather, ect. Mouse goes c

  • Delay in Opening Menu in SBO!

    Dear All, I am facing a typical problem in my system, when I am opening any menu as manager login, all the the menus are opening properly. But when I switch the user then SBO is traking too much time for opening any menu even some time for adding A/R