Help needed in plotting Line Graph!!!!!!!!!Pls help!!

Hi, i need help in plotting a simple line graph showing the x&y axis and has to plot 3 different lines in the same graph.I have written a program and i need to implement this graph in it.Is there any tutorial for plotting line graphs,i mean steps included.
Please help!

You describe your need, but not where it originates from.
Is it a programming assignment? If so, I hope this is not your chosen major, as you will fail because you are a non-resourceful plagarist.
Do you need to simply graph some data? Use an existing package. There are free ones somewhere.
What do you mean "i have written a program and i need to implement this graph in it"? If you wrote the program, wouldn't you be done?
Enjoy programming

Similar Messages

  • Help needed in plotting line graph!

    Hi i need help in plotting a line graph complete with both axes shown,plus the legend on the side shown.
    Pls help!!!!
    rgds

    Here's a simple line graph applet I did some time backimport java.awt.*;
    public class LineGraff extends java.applet.Applet{
       double []toGraff = {6.0, -14.0, -164.0, -210.0, 108.0, 770.0,
                                1354.0, 896.0, -572.0, -1348.0, -780.0, -108.0};
       double []numsFromFile = {6.0, -14.0, -164.0, -210.0, 108.0, 770.0,
                                1354.0, 896.0, -572.0, -1348.0, -780.0, -108.0};
       int max, min, size, Hscale;
       double Vscale;
       public void init(){
          size = numsFromFile.length-1;
          java.util.Arrays.sort(numsFromFile);
          max = (int) numsFromFile[size];
          min = (int) numsFromFile[0];
          Vscale = max-min;
          Vscale = 200/Vscale;
         Hscale = Math.round(300/size);
       public void paint(Graphics g) {
          g.setFont(new Font("Arial",0,14));
          g.drawString("Example app: drawing a graph from a double array",25,18);
          g.setFont(new Font("Arial",0,10));
          g.setColor(Color.blue);
          g.fillRect(10,20,365,230);
          g.setColor(Color.cyan);
          g.drawLine(25,25,25,225);
          g.drawLine(25,140,330,140);
          g.setColor(Color.white);
          int intA = 30, intB = 0, intC = 0;
          int intD = (int) (Math.round(140 - (Vscale * toGraff[0])));
             for(int i=1; i <= size; i++) {
               intC = intA + Hscale;
               intB = intD;
               intD = (int) (Math.round(140 - (Vscale * toGraff[ i ])));
               g.drawLine(intA, intB, intC, intD);
                  if(toGraff[ i ] > 0)
                     g.drawString(Double.toString(toGraff[ i-1 ]), intA+6, intB-3);
                  else
                     g.drawString(Double.toString(toGraff[ i-1 ]), intA+6, intB+8);
               intA += Hscale;
          g.drawString(Double.toString(toGraff[size]), intA+6, intD-3);    
    }

  • HT3702 I am unable to add my bank/card details in my apple account, every time i am getting a message that it has been declined. kindly help me in authorise my bank card in my apple account i need to purchase few apps, pls help me

    Hi,
    I am unable to add my bank/card details in my apple account, every time i am getting a message that it has been declined. kindly help me in authorise my bank card in my apple account i need to purchase few apps, pls help me

    What sort of card are you trying to use ? If it's a debit card then I don't think that they are still accepted as a valid payment method - they are not listed on this page and there have been a number of posts recently about them being declined
    If it's a credit card then is it registered to exactly the same name and address (including format and spacing etc) that you have on your iTunes account, it was issued by a bank in your country and you are currently in that country ? If it is then you could check with the card issuer to see if it's them that are declining it, and if not then try contacting iTunes support and see if they know why it's being declined : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management

  • Help creating a simple line graph

    Hi
    Im very new to the Java language, yet have some background knowledge of C and C++.
    i have a problem with an application i am developing for a university assignment, the program is to simply simulate a water pressured nuclear reaction. the main JFrame holds various JLabels that show the current core temperature, electricity produced etc. But i want to add a very simplistic line graph to the same window, it is to purely show a line that updates (no axis or labels). The graph is to illustrate how much electricity was produced on the current cycle of the reactor, the user can initiate each cycle by pressing a JButton.
    i have found some info on drawing, but cannot find anything that helps.
    Any info on how to do this (its only meant to be a samllish part of the main window), any code examples or sites that have a very relevant tutorial would be appreciated.
    Sorry for the length of this, and if anyone needs any more info on this then let me know.
    thanks

    Cross posted,
    http://forum.java.sun.com/thread.jsp?forum=54&thread=394494&tstart=0&trange=15

  • I am creating an apple account on my phone but it says i need to pay, can anyone pls help

    I am creating an apple account on my phone but it says i need to pay before i can get an account. i really need help on this

    if you mean it is asking for credit card information when setting up an apple id and you do not have one or do not want to provide it, read this: http://support.apple.com/kb/HT2534

  • I need to query single bytes - Pls help

    Hi, I have got a method which performs different operations. I would like to update the state of a variable with the different steps occurred in the code execution and, at a later time, to query this variable to check what to do.
    Example:
    variable = -1;//This is an instance variable
    if (cacheCleared) {
      variable &= PageCanvas.CACHE_CLEARED;
    if (imagesCleared) {
      variable &= PageCanvas.IMAGES_CLEARED;
    if (xmlCleared) {
      variable &= PageCanvas.XML_CLEARED;
    //And so on...Then, after the method returns, I'd like to be able to to query 'variable' to check which steps have been performed with something like:
    if ((variable == PageCanvas.CACHE_CLEARED & PageCanvas.IMAGES_CLEARED)) {
       //do something;
    } else if (variable == PageCanvas.CACHE_CLEARED & PageCanvas.XML_CLEARED) {
      //do something else
    }I saw somewhere something like offset concepts, but I don't know how to implement it. Could you keep in mind that we run in a memory constrained environment, therefore I'd like to use, let's say, an int and having the constants as bytes?
    Thanks for any help.

    Hi, I have tried the following code:
    byte b1 = 1;
    byte b2 = 2;
    byte b3 = 4;
    byte b4 = 8;
    byte results = 0;
    results |= b1;
    results |= b3;
    results |= b4;
    System.out.println(results == (results | b1));
    System.out.println(results == (results | b2));
    System.out.println(results == (results | b3));
    System.out.println(results == (results | b4));And the result is:
    true
    false
    true
    true
    However, I noticed that it's important to assign the bytes the values of the bits right to left:
    0000 0001
    0000 0010
    0000 0100
    0000 1000
    The first byte should have value 1
    The second should have value 2
    The third should have value 4
    The fourth should have value 8
    So that the | operator works.

  • Reg Exp help needed (trouble with line breaks)

    Hello,
    I am attempting to parse a line of text with regular expressions. I am having difficulty with the line breaks.
    I want to divide the following line by the first '\n' char.
    For instance, I wan the output to be as follows:
    found 1: one
    found 2: ddd
    dddHowever, I get the following with my attached code:
    found 1: one
    found 2: dddHowever, the second line break seems to be the end of the second group.
    How do I get the any character '.' to read past any subsequent line breaks?
    import java.util.regex.*;
    public class Test
         String rawSequenceArg = ">one\nddd\nddd";     
           Pattern p = Pattern.compile(">([^\n]+)\n(.+)");
           Matcher m = p.matcher(rawSequenceArg);
           if(m.find())
                System.out.println("found 1: " + m.group(1));
                System.out.println("found 2: " + m.group(2));
    }

    In this case, the DOTALL flag is the one you need; it allows the dot (period, full stop) to match line separator characters. MULTILINE makes the '^' and '$' anchors match the beginning and end of logical lines, instead of just the beginning and end of the input.

  • When I started my iPhone 5s for the first time I had given india as region/country/location. Now I am in UAE, whenever I search for any location it saying "no result found" I need to change the location pls help

    first

    There's a number of potential problems here, and they may not necessarily be at your end.
    First of all, it should be clear that CMYK is not so much a generic "image mode" as it is a description of specific press conditions. If you produce final CMYK, you must have the right profile. Don't use Image > Mode, use Convert to Profile.
    Given that, I would question anyone who doesn't accept Adobe RGB photographs for a magazine article, because it implies a process that isn't properly color managed and generally not up to date. A standard workflow today would use InDesign, where images are normally placed in their original RGB space whatever that is. Then the conversion to final output CMYK is done as the last step, when producing a press-ready PDF from InDesign.
    It helps tremendously if you know that final CMYK, because then you can proof to that so your file survives the CMYK conversion with the least possible damage (we're talking gamut clipping here; not general color shifts). But it's not absolutely required, which is why this workflow is relaitively safe.
    Third, CMYK jpeg is in itself risky, because many jpeg decoders (in some software) don't have proper CMYK support. The result can be weird colors. This could well be the problem here, because it sounds as if your client uses a non-standard workflow.
    So what to do? I would send two files. One sRGB as reference, which is guaranteed to come through correctly. Then find a way to send TIFF for the CMYK version if they insist, or ask them to try opening it in different software. Of course you should have a calibrated and profiled display, but I agree that's probably not the immediate problem here. There's no particular reason a CMYK file should come back with twisted colors if it's opened and processed in properly color managed software.

  • Help needed! White lines over uncompressed avi export - CS4 v4.2

    Hello,
    I am having problems exporting an uncompressed avi at max bit depth in Premiere Pro CS4. Whenever I export it, I get what is below. Please look at the image to get an idea of what it looks like. The quality is there, just the white lines are annoying.
    http://i213.photobucket.com/albums/cc291/madindehead/PremierePro_export_weird.png
    However, when exporting as an uncompressed avi with 8 bit bit depth, the quality is worse, but there are no white lines. I am using the UYVY codec. As you can see, the quality of the export is excellent, but it is spoiled by those lines. Does anyone know what could be causing it, and how can I fix it? I don't really want to use 8 bit depth, as the quality is nowhere near as good sadly.
    Thanks.

    I tried looking here: http://forums.adobe.com/message/2105977#2105977
    Which led me to encoding the video with VirtualDub, using a lossless codec, and then re-exporting it from Premiere. However, exactly the same thing happened. I have found, that using Uncompressed Microsoft AVI, with Render at maximum depth selected and using the UYVY codec, definitely gives the best quality. If I un-tick "Render at maximum depth" the problem DOES NOT occur, however, the quality is nowhere near as good. So I think this is where the problem lies. You can see under that white layer, that the quality is there. But still no joy sadly.
    I am using StaxRip to encode the files as MP4 using the x264 codec, and this gives excellent quality, for the file size. As I am using this, I obviously want the highest quality output from Premiere that I can possibly get.

  • Since uptade IOS 5 videos can't play on a playlist like before need play videos like playlist pls help !

    i have use my iphone always for music on car etc etc so now i get the new Update and i cant make playlist with music videos so far, BTW some else have same problem or how do i fix this somebody know how to make a playlist with music videos

    well thax i check out the apps and are good for me but the last version allowed u to close de ipod app then u push button x2 then u clear all open apps or just ipod app then u push play on the mini remote on same place then u lock down the phone push again the button and push play and it run the ipod with lock screen thats what i mean
    hope u understand mee ! =)

  • I just switch from iphone 3sg to iphone4 now when i download an app on my iphone4 it keeps saying it needs security code whet code pls help me thank you

    so seriously wat is the security code there talking about

    I believe you are correct. I had to replace my phone and it was necessary to enter the (3 digit) security code from the credit card the first time I updated some apps on the new phone. Thereafter only the password was requested.

  • I need solutions for the following pls help

    1) what is the difference between doPost() and doGet()
    2) what is difference between sendRedirect() and forward()
    3) can we call destroy() in servlet class
    4) advantages and disadvantages of Hidden Form fields,URLRewritting,Cookies
    5) can we write a constructor for a servlet class

    1) in get request parameters are sent as part of request URL and its size is limited to some houndreds of KB (can't remember this limit) in case of post data is sent within request body. So in servlet you can have seaparate handling for get and post methods. I most cases you can create single routine like processRequest and call it from doGet and doPost
    2) Send redirect sends request to browser to redirect to different URL. Then browser redirects and user can see new URL (its done by browser), forward is used to move request processing to other servlet or JSP in SAME container. Client knows nothing and URL in browser does not change. It is typical approach used when implementing MVC approach. Eg. server gets request and process it eg. query data from database and puts result as request attribute (not parameter) then servlet forwards rerquest to JSP which is responsible for display (view).
    3) this is a public method of servlet so of course you can call it as any other visible method, but it is intended to let you make some cleansing when container is going to remove servlet.
    4) You shoud find some article on it, too large topic. Generally: url rewriting will work if cookies are enabled or disabled, when you use cookies for session id storage it won't work if cookies are disabled on client side. I can't see good reason to use hidden form fields when you can user URL rewriting.
    5) Of course you can but it won't be used by servlet container. Servlt's init method is the one you should use for initialization tasks.

  • Urgent help needed.....any help appreciated....

    q, Design and implement a java class called statistics that computes the mean, median, standard deviation. Design and implement a java application called statisticsDriver that generates a list of 50 integers (generated randomly) and prints the statistical measures which are calculated using the Statistis Class. Assume there will be no more then 50 input values. Compute all statical values as floating values.
    The above was the question, and below is what i have done so far for the mean part, but it seems to have errors, any help???
    p.s I am also confused what it means by driver class, and do i have to do individual classes for the different statistical measures....please helppppp !!!!!!!!!!, any help would be appreciated...thanks.
    The class say Mean contains the following method:
    public static double mean(double[] data)
    double sum=0.0;
    for (int index=0; index sum=sum+data[index];
    sum=sum/data.length;
    return sum;
    The driver for this class:
    public static void main(java.lang.String[] args) {
    double[] myData={2,5,4,6,7,13};
    System.out.println("The mean of myData");
    System.out.println(Mena.mean(myData));

    This is my method to work out the mean,median and mode of a set of numbers.
    But what i need to do is find the mean, median and mode from a driver class, which generates a list of random numbers, no more then 50. I don't know where to fit this in my method...please help!!!!!!
    main:
    public static void main(String[] args) {
    int[] mainArray = {2,3,6,6,6};
    //outputArray( "Original Array: ",mainArray );
    System.out.println("average is " + mean( mainArray ));
    System.out.println("median is " + median( mainArray ));
    System.out.println("mode is " + mode( mainArray ));
    //mean
    public static double mean(int[] mainArray) {
    int sum = 0;
    for (int i = 0; i < mainArray.length; i++) {
    sum = sum + mainArray;
    double average = sum / mainArray.length;
    return average;
    //median
    public static int median(int[] mainArray) {
    //double sortList = sort(mainArray);
    final int EVEN_NUMBER_OF_ELEMENTS = 0;
    int result = mainArray.length % 2;
    int median = 0;
    // Definition: Median is the Middle number in an odd number of entries array
    // Median is the avg of the two number in the center of an even number array
    if (result == EVEN_NUMBER_OF_ELEMENTS) {
    int rightNumber = mainArray.length / 2;
    int leftNumber = rightNumber - 1;
    median = (mainArray[rightNumber] + mainArray[leftNumber]) / 2;
    else { // Odd number of items, choose the center one
    int rightNumber = mainArray.length / 2;
    median = mainArray[rightNumber];
    return median;
    //mode
    public static double mode(int[] mainArray)
    int mode = 0;
    int elements = 0;
    int tempMode = mainArray[0];
    int temp = 1;
    int x;
    for( x = 1; x < mainArray.length; x++)
    if(mainArray[x-1] == mainArray[x])
    temp++;
    else
    if(temp > elements)
    tempMode = mainArray[x-1];
    elements = temp;
    temp = 1;
    else
    temp = 1;
    if (temp> elements)
         tempMode = mainArray[x-1];
    mode = tempMode;
    return mode;
    any help appreciated..

  • Urgent help in cursor for loop. PLS HELP HELP HEP

    suppose i got table_a, in table_a i've got abc_id and bcd_name. the data as below:
    abc_id bcd_name
    1 a
    1 b
    1 c
    1 d
    in stored procedure as the statement below, i can only select 1 record into a local variable:
    select bcd_name
    into l_bcd_name
    where abc_id = i_abc_id;
    how am i going to select all the records? i know it's going to use a cursor for-loop statement but i dont know how to use. any1 can help?
    Message was edited by:
    babyekc

    Hi,
    You can do like this.
    Just write the following code in ur Stored Procedure.
    CURSOR C1 IS SELECT ABC_ID, BCD_NAME FROM TABLE_A;
    BEGIN
    OPEN C1;
    LOOP
    FETCH C1 INTO TEMP_ABCID, TEMP_BCDNAME;
    EXIT WHEN C1%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE('ABC ID is ' || TEMP_ABCID);
    DBMS_OUTPUT.PUT_LINE('BCD NAME is ' || TEMP_BCD_NAME);
    END LOOP;
    CLOSE C1;
    END;
    Before declaring the cursor, declare the variables TEMP_ABCID, TEMP_BCDNAME.
    Thanks.

  • HELP NEEDED....F4 VALUE HELP IN WEB UI

    Hi Experts...
    I am new to CRM ...and WEB UI ENHANCEMENTS...
    My Requirement : Provide F4 Value help for Opportunity field Partner Number Description(Component BTPARTNER,
                                             Context Node BTPARTNER,
                                             Structure PARTNER_NO_DESCR)
    How do I provide F4 value help?I got a pointer as  to implement code as below in GET_V method of field..
    CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_f4descr
    EXPORTING
    iv_help_id = '(CL_CRM_UIU_BP_IDTYPE_2_F4)' "#EC NOTEXT
    iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
    iv_input_mapping = lt_inmap
    iv_output_mapping = lt_outmap.
    Now what you have to alter is the variable lv_help_id to reflect a F4-Valuehelp class.As you can see CL_CRM_UIU_BP_IDTYPE_2_F4 is a normal ABAP class
    implementing interface IF_BSP_WD_CUSTOM_F4_CALLBACK.
    Now where do i implement IF_BSP_WD_CUSTOM_F4_CALLBACK interface?
    I have to select Employees assigned to certain Positions and display the Name and ID of them in the Result window.How do I do that?
    In which table are the relationships of BP and Positions stored?
    Looking forward to some pointers...
    Helpful Pointers would be rewarded..
    Thanks...

    Hi Kamesh,
    Kamesh it can be one of the reasons :
    BP_DATA/MarketingAttributesEOVP  seems to be overview page and probaly it will be always in display mode.The method METHOD GET_I_DESCRIPTION has { rv_disabled = 'TRUE'.}  code  which always disables so can be read only.Try and sctivate the below code
    DATA: current TYPE REF TO if_bol_bo_property_access.
    rv_disabled = 'TRUE'.
    IF iterator IS BOUND.
       current = iterator->get_current( ).
    ELSE.
       current = collection_wrapper->get_current( ).
    ENDIF.
    TRY.
         IF current->is_property_readonly(
                       'DESCRIPTION' ) = abap_false.           "#EC NOTEXT
           rv_disabled = 'FALSE'.
         ENDIF.
       CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
             cx_crm_genil_model_error.
         RETURN.
    ENDTRY.
    Also it is an attrubute set structure and the GET_V_ATTR_SET_DESCR method sets some values for description which might be overwriting get_v_description .
    I'm unable to see this field in my WebUi so not 100% sure of above.Give it a try.
    Regards
    Jignesh

Maybe you are looking for