Plotting a graph having data points derived through cumulative functions

Issue: Couldn't plot a graph that has data set derived through cumulative functions
Error message: View Display Error
Odbc driver returned an error (SQLExecDirectW).
Error Details
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 937, message: ORA-00937: not a single-group group function at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
Issue Details:
I have a repository build with Business model mapping having a couple of logical columns based on cumulative functions. The columns are defined as posted in Re: Support to oracle cumulative functions I successfully created those columns in Business model mapping and Presentation layers. Then I checked in my changes to reflect in OBIEE dashboard / answers. I included those columns in my dashboard along with some other required columns. When I try to plot graph / table I am getting the error message as mentioned.
I observed the sql query sent to database and found that in second level select clause has some columns included with out 'group by' clause. I have executed the SQL query after adding required group by clause and it gave me some results based on the criteria.
The SQL query sent by OBIEE to database is:
select D1.c5 as c1,
     D1.c6 as c2,
     ( ( SUM(SUM(D1.c3) ) OVER () ) - ( SUM( SUM(D1.c4) ) OVER ( ORDER BY D1.c2 desc ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) ) ) as c3,
      ( ( SUM( SUM(D1.c3) ) OVER () ) - ( SUM( SUM(D1.c3) ) OVER ( ORDER BY D1.c2 DESC ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING ) ) ) as c4
from
     (select T1385.DAY_WID as c2,
               sum(T1385.PLANNED_LABOR_UNITS) as c3,
               sum(T1385.ACTUAL_LABOR_UNITS) as c4,
               T1308.PROJECT_NAME as c5,
               T1168.DAY_DT as c6
          from
               W_PROJECT_D T1308 /* Dim_W_PROJECT_D_Project */ ,
               W_PROJECT_SECURITY_S T5074 /* System_W_PROJECT_SECURITY_S_ProjD */ ,
               W_ACTIVITY_D T1187 /* Dim_W_ACTIVITY_D_Activity */ ,
               W_PROJECT_SECURITY_S T5118 /* System_W_PROJECT_SECURITY_S_Actv */ ,
               W_DAY_D T1168 /* Dim_W_DAY_D_Common */ ,
               W_ACTIVITY_SPREAD_F T1385 /* Fact_W_ACTIVITY_SPREAD_F_Activity_Spread */ ,
               W_PROJECT_SECURITY_S T5090 /* System_W_PROJECT_SECURITY_S_ActSpread */
          where  ( T1308.ROW_WID = T1385.PROJECT_WID and T1168.ROW_WID = T1385.DAY_WID and T1308.ROW_WID = T5074.PROJECT_WID and T1187.ROW_WID = T1385.ACTIVITY_WID and T1187.PROJECT_OBJECT_ID = T5118.PROJECT_OBJECT_ID and T1187.ACTIVITY_NAME = 'ActivitySatya8' and T1385.PROJECT_WID = T5090.PROJECT_WID and T5074.PROJECT_SEC_KEY = 1 and T5090.PROJECT_SEC_KEY = 1 and T5118.PROJECT_SEC_KEY = 1 and (T1308.PROJECT_NAME in ('P6PilotPrjSatya2')) )
          group by T1168.DAY_DT, T1308.PROJECT_NAME, T1385.DAY_WID
     ) D1
order by c1, c2
{code}
Any help would be appreciated.
Thanks,
Satya                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Hi,
I have added following code as group by in Answers advanced tab.
"General - (Project)"."Project Name", "General - (Activity)"."Activity Name", Calendar."Calendar Date", Calendar.DAY_WID
{code}
Sql issued shown in Answers advanced tab is
{code:sql}
SELECT "General - (Project)"."Project Name" saw_0, "General - (Activity)"."Activity Name" saw_1, Calendar."Calendar Date" saw_2, Calendar.DAY_WID saw_3, Units.SatyaTestRemainingUnits saw_4, Units.SatyaTestAvailableUnits saw_5 FROM "P6 Detailed Performance" WHERE ("General - (Project)"."Project Name" = 'P6PilotPrjSatya2') AND ("General - (Activity)"."Activity Name" = 'ActivitySatya8') GROUP BY "General - (Project)"."Project Name", "General - (Activity)"."Activity Name", Calendar."Calendar Date", Calendar.DAY_WID ORDER BY saw_0, saw_1, saw_2, saw_3
{code}
I am getting error even after adding the group by function explicitly from Answers advanced tab. The error message while displaying results in Chart is:
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 937, message: ORA-00937: not a single-group group function at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
SQL Issued: SELECT "General - (Project)"."Project Name" saw_0, "General - (Activity)"."Activity Name" saw_1, Calendar."Calendar Date" saw_2, Calendar.DAY_WID saw_3, Units.SatyaTestRemainingUnits saw_4, Units.SatyaTestAvailableUnits saw_5, AGGREGATE(saw_4 BY saw_0), AGGREGATE(saw_5 BY saw_0) FROM "P6 Detailed Performance" WHERE ("General - (Project)"."Project Name" = 'P6PilotPrjSatya2') AND ("General - (Activity)"."Activity Name" = 'ActivitySatya8') GROUP BY "General - (Project)"."Project Name", "General - (Activity)"."Activity Name", Calendar."Calendar Date", Calendar.DAY_WID ORDER BY saw_0, saw_1, saw_2, saw_3
I am getting the following error, while displaying the results in a Table
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 42020] GROUP BY clause, [Dim - Project.Project Name, Dim - Activity.Activity Name, Dim - Date.Calendar Date, Fact - Activity Spread.DAY_WID], is inconsistent with the projected columns in the SQL query request. (HY000)
SQL Issued: SELECT "General - (Project)"."Project Name" saw_0, "General - (Activity)"."Activity Name" saw_1, Calendar."Calendar Date" saw_2, Calendar.DAY_WID saw_3, Units.SatyaTestRemainingUnits saw_4, Units.SatyaTestAvailableUnits saw_5 FROM "P6 Detailed Performance" WHERE ("General - (Project)"."Project Name" = 'P6PilotPrjSatya2') AND ("General - (Activity)"."Activity Name" = 'ActivitySatya8') GROUP BY "General - (Project)"."Project Name", "General - (Activity)"."Activity Name", Calendar."Calendar Date", Calendar.DAY_WID ORDER BY saw_0, saw_1, saw_2, saw_3
Thanks,
Satya                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How can I plot two sets of data points in 3d graph?

    I am trying to plot two sets of data points in 3d graph. I also need to make a set of data with one color and the other set with a different color. For example, I need to plot 10 (x,y,z) data points in 3d. Maybe 6 points need to be blue, and the other 4 red. Could you tell me how?

    What is your LabVIEW version? (things are a bit different in 8.6).
    Basically, you create multiple instances of the VI that gets placed automatically when you drop the 3D graph and then wire a different number to the plot ID at the bottom.
    You define all the plots (color, style) via the properties dialog.
    Have a look at my example posted here. One plot is "blue dots" and one is a "shaded surface". See how far you get.
    Message Edited by altenbach on 04-23-2009 01:11 PM
    LabVIEW Champion . Do more with less code and in less time .

  • How do I get the numbers ipad app to plot a graph of dates against values, where the most recent date is on the right of the graph, but the most recent date is at the top rather than bottom of the rows in the table?

    How do I get the numbers ipad app to plot a graph of dates against values, where the most recent date is on the right of the graph, but the most recent date is at the top rather than bottom of the rows in the table?
    Also how can it be a line graph without plotting a circle at each value?
    Thanks this is very frustrating

    Make a copy of the table and produce your Line chart or Bar chart from the copy. Sort the copy into the order you want to see in your chart.
    Alternately you could use a Scatter Chart...
    Jerry

  • 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

  • Need charting help - multiple data points between major ticks

    Hi,
    I am trying to create an AreaChart in which the data shows a
    consumption rate over the course of a week. The major points along
    the x-axis will be Monday, Tuesday, ... , Sunday (the days of the
    week). However, there are multiple data points between each day. I
    only want the days of the week to show on the axis but I want to
    plot all of the data points. How would I go about accomplishing
    this task?
    Thanks in advance,
    Brent Schooley

    Thanks, it is getting closer now. My only problem now is that
    the data points do not line up correctly with the tick marks. I've
    look through the documentation and I can't figure out what to do to
    ensure this happens. Here are the relevant portions of my code:
    [Bindable]
    public var energyDataAC:ArrayCollection = new
    ArrayCollection( [
    {date: "2007, 7, 27, 0", saved: 0},
    {date: "2007, 7, 27, 12", saved: 50},
    {date: "2007, 7, 28, 0", saved: 35},
    {date: "2007, 7, 28, 12", saved: 0},
    {date: "2007, 7, 29, 0", saved: 0},
    {date: "2007, 7, 29, 12", saved: 46},
    {date: "2007, 7, 30, 0", saved: 39},
    {date: "2007, 7, 30, 12", saved: 0},
    {date: "2007, 7, 31, 0", saved: 0},
    {date: "2007, 7, 31, 12", saved: 44},
    {date: "2007, 8, 1, 0", saved: 45},
    {date: "2007, 8, 1, 12", saved: 0} ]);
    public function myParseFunction(s:String):Date {
    // Get an array of Strings from the comma-separated String
    passed in.
    var a:Array = s.split(",");
    // Create the new Date object.
    var newDate:Date = new Date(a[0],a[1],a[2],a[3]);
    return newDate;
    <mx:AreaChart id="Areachart" height="100%" width="100%"
    paddingLeft="5" paddingRight="5"
    showDataTips="true" dataProvider="{energyDataAC}" >
    <mx:horizontalAxisRenderer>
    <mx:AxisRenderer styleName="myAxisStyle"/>
    </mx:horizontalAxisRenderer>
    <mx:horizontalAxis>
    <mx:DateTimeAxis alignLabelsToUnits="true"
    dataUnits="hours" labelUnits="days" dataInterval="12" interval="1"
    parseFunction="myParseFunction"/>
    </mx:horizontalAxis>
    <mx:series>
    <mx:AreaSeries yField="saved" xField="date"
    form="segment" displayName="Energy Saved"/>
    </mx:series>
    </mx:AreaChart>
    <mx:Legend dataProvider="{Areachart}"/>
    Any ideas?
    Thanks,
    Brent

  • Plotting of graph with more than 4000 data points in Excel

    Hi All,
    I am fairly new to labview world. I am trying to plot out line graphs of the results from my program into Excel worksheet. I have huge set of data points(10000) stored in each of 10 different worksheets in MS Excel workbook. I am trying to compile results into last sheet as graphical representation of all the various dataset into 10 different graphs.
    My problem is that I am getting error because MS Graph does not allow me to plot more than 4000 rows or datapoints. Is there better and cleaner way of programming this? Or if some one can provide an example of how to handle such case. I'll appreciate any help.
    My goal is to able to plot one set of data 1st then I will be able to run through various worksheets to compile into standalone results.
     ERROR MESSAGE: "Report Generation Toolkit: Graphs you create or edit in Microsoft Graph cannot contain more than 4,000 rows or columns, including row and column headers. "
    Also for example if we run Line Graph example and change the # of data points from 100 to 4000, we get same message.
    Error -41114 occurred at NI_ReportGenerationToolkit.lvlib:Excel_Insert_Chart.vi -> NI_Excel.lvclass:Excel Insert Graph.vi -> Line Graph (Excel).vi
    Thanks,
    Saurabh

    Hi Dennis,
    I am collecting waveform data from oscilloscope using labview in both data & graph format. So my program collects data for a particular operating condition & then saves the data on a worksheet. After it loads new operating condition & goes over same cycle. I have to save all the data points in excel for different use cases, which I am saving in different worksheet for each specific operating condition.
    Since I already have data saved in excel at the end of test, I am trying plot each use case in the same report for study & presentaion after tests are finished. I have not been able to do so. I read the post which you have mentioned, seems like newer excel or labview version have same issue. I am using LV 9.0
    I will try using decimation but if you have any better way of handling this problem, I'll appreciate if you can share that.
    Thanks for your help.

  • How can I get my graph to plot vs. my data points instead of vs. time?

    how can I get my graph to plot vs. my data points instead of vs. time?

    Maybe you could exaplin in a few more words what "my data" is. Are the values equally or randomly spaced?
    If they are equally spaced, just adjust offset and multiplier, and axis label.
    If they are randomly spaced you are probably looking for an X-Y graph. Check the shipping examples.
    LabVIEW Champion . Do more with less code and in less time .

  • 3D Line Graph.vi not displaying line connecting data points.

    I'm having trouble getting 3D Line Graph.vi to display the line connecting my data points.  I'm collecting latitude, longitude, and depth data from a binary file, loading this data into arrays with a while loop, and sending those arrays to 3D Line Graph.vi.  When I tried doing it with arrays created by random number generators, the line is displayed, but when I use it with my actual data, no lines are displayed.  I can only see where the data points are when rotating the 3D graph.  Any ideas on this would be appreciated.
    Thanks,
    Morgan
    Attachments:
    Plot Depth.PNG ‏61 KB

    Karunya,
    Thanks for the info on the 3-D Curve VI.  I tried it and it works.  I think I was able to find the problem with 3D Line Graph.vi.  It has something to do with plotting very close points away from the origin and scaling the axes to view the line.  I have attached an example of where the vi breaks down.  In this example, you can see that part of the line is drawn, but when you rotate the graph, you can see that the line is not drawn through all of the points.  If you change the scale of the axes, then you eventually get the line to go through all of the points, but then the graph is not very "readable" at that point.  It's when you try to zoom in really close to the plotted points.
    Thanks!
    Morgan
    Attachments:
    3d Line Graph Error.vi ‏16 KB

  • Transparency fill in line graph data points does not copy over to Pages

    I have created some line graphs in Numbers, and they look beautiful. Since some of my data overlap and I want users to be able to easily see where all data is on the graph, I have made the data points transparent on the foremost line. This allows the other line (which data points are filled in with another color) visible "through" the foremost line.
    However, when I attempt to copy the graphs into Pages, the data points of the foremost line are no longer transparent - they are filled with white. Obviously, this defeats the entire purpose of using a transparency fill!
    What can I do to make this work?
    Thank you,
    G. Pasarescu

    Hi Yvan,
    Thank you for the tip. Unfortunately, I need to embed several of these charts into the Pages document, and cannot use Numbers instead of Pages for the document.
    Interestingly, if I copy the chart from Numbers and paste it into some graphics programs (like Pixen and Pixelator), the transparency is preserved. However, pasting the same copy into other graphics programs (such as Seashore or Photoshop) somehow flattens the image, removing the transparency, and I'm back to square one.
    Using a graphics program as the bridge between Numbers and Pages reduces the quality of the chart - that's why I'd like to try to make this work in Numbers / Pages.
    Thanks,
    Geoff

  • How do I place text on a ScatterGraph and have an arrow point to a data point on a plot?

    For example, show the minimum point with the string "MIN" and draw an arrow from the text to the minimum point.
    I am using Measurement Studio 7.0 with C#. This could be accomplished in MS 6.0 with annotations.

    The Measurement Studio 7.0 graphs (WaveformGraph and ScatterGraph) expose events that allow you to custom draw areas of the control. Most of these events appear as pairs of BeforeDraw____ and AfterDraw___. The BeforeDraw events are raised before the drawing begins and AfterDraw events are raised after the drawing has completed.
    In your case, you can attach an event handler to the AfterDrawPlotArea event of the ScatterGraph since you want to draw on top of everything that is drawn in the plot area. In the event handler:
    // Assuming e is the name of the AfterDrawEventArgs parameter.
    // Find the minimum y-value on the first plot in the Plots
    // collection of the graph.
    double[] xData = scatterGraph1.Plots[0].GetXData();
    double[] yData = scatterGraph1.Plots[0].GetYData();
    if (yData.Length > 0)
    double x = xData[0];
    double yMin = yData[0];
    for (int i = 1; i < yData.Length; ++i)
    if (yData[i] < yMin)
    x = xData[i];
    yMin = yData[i];
    // Map the data point to a point in device coordinates.
    PointF minPoint = scatterGraph1.Plots[0].MapPoint(e.Bounds, x, yMin);
    // Calculate the starting point for the line of the
    // arrow.
    PointF startingPoint = new PointF(minPoint.X + 1, minPoint.Y - 1);
    PointF endingPoint = new PointF(minPoint.X + 10, startingPoint.Y - 9);
    // Draw a vertical line representing the stick of the
    // arrow from the point.
    e.Graphics.DrawLine(Pens.White, startingPoint, endingPoint);
    PointF leftArrowEnd = new PointF(startingPoint.X, startingPoint.Y - 3);
    PointF rightArrowEnd = new PointF(startingPoint.X + 3, startingPoint.Y);
    // Draw the arrows.
    e.Graphics.DrawLine(Pens.White, startingPoint, leftArrowEnd);
    e.Graphics.DrawLine(Pens.White, startingPoint, rightArrowEnd);
    // Calculate the location of the text by centering it
    // about the arrow.
    SizeF textSize = e.Graphics.MeasureString("MIN", scatterGraph1.Font);
    PointF textLocation = new PointF(endingPoint.X + 1, endingPoint.Y - (textSize.Height / 2));
    // Draw the "MIN" string
    e.Graphics.DrawString("MIN", scatterGraph1.Font, Brushes.White, textLocation);
    Hope this helps.
    Abhishek Ghuwalewala
    Measurement Studio
    National Instruments
    Abhishek Ghuwalewala | Measurement Studio | National Instruments

  • Plotting multiple graphs on one waveform chart with dynamic data types

    I'm trying to put multiple graphs on one waveform chart and having data agreement errors. I'm wondering if it has anything to do with the fact that dynamic data is being used (I've had no problems with other datatypes in the past). Does anyone know how to correct this problem? I've attached the following .VI. There will be plenty of .VIs on the bottom that won't load, but they are not consequential for this problem.
    Thanks!
    Brian
    Solved!
    Go to Solution.
    Attachments:
    Stiffness Control V1.vi ‏119 KB

    you could use stacked plots by right clicking on the chart and clicking on the stacked plots and than on the front panek you can put a bundle function on the FP and hook your signals up
    Harold Timmis
    [email protected]
    Orlando,Fl
    *Kudos always welcome
    Attachments:
    multiplotwaveform.JPG ‏138 KB

  • Graphing Multiple 3D Graph Types with Spherical Data Points

    I have data points that are in theta, phi and r (magnatude) that I would like to be able to 3D plot and change the text/contour to either wireframe or contoured or points on the fly.  I believe this is possible however, after looking at the NI examples, they are all done with xyz coordinates and have yet to see a 3D graph with spherical (NI, take this as a suggestion ).
    Over a year ago, I was able to create data in spherical by giving it 3 1D arrays, but it only plotted it in the form of point or line.  The examples that have a torus use parametric plots?! although I am not entirely sure I understand how it works nor how to convert to it from spherical.
    Attached is a sample input file/array.  Wanted to see if anyone had experience using the built in 3D libraries (CW 3D Graph
    8.0) to achieve something similar.
    Note: the Amplitude column is absolute and could be made positive for ease of use as well.
    Thanks
    Attachments:
    example.txt ‏47 KB

    I'm just trying the following in the main loop to get something to graph, and nothing is showing up but this error - 80020009
    static int panelHandle;
    static CAObjHandle gGraph;
    //==============================================================================
    // Static functions
    //==============================================================================
    // Global variables
    //==============================================================================
    // Global functions
    /// HIFN The main entry-point function.
    int main (int argc, char *argv[])
    int error = 0;
    VARIANT xVt, yVt, zVt;
    HRESULT hr;
    int i,j;
    char errCode[100];
    double xData[50], yData[50], zData[50][50];
    /* initialize and load resources */
    nullChk (InitCVIRTE (0, argv, 0));
    errChk (panelHandle = LoadPanel (0, "3D Analysis.uir", PANEL));
    /* display the panel and run the user interface */
    errChk (DisplayPanel (panelHandle));
    CA_VariantSetEmpty(&xVt);
    CA_VariantSetEmpty(&yVt);
    CA_VariantSetEmpty(&zVt);
    for (i = 0; i < 50; i++) {
    xData[i] = yData[i] = i;
    for (j = 0; j < 50; j++) {
    zData[i][j] = i*j;
    GetObjHandleFromActiveXCtrl(panelHandle, PANEL_CWGRAPH3D, &gGraph);
    errChk (CA_VariantSet1DArray(&xVt,CAVT_DOUBLE, 50, xData));
    errChk (CA_VariantSet1DArray(&yVt,CAVT_DOUBLE, 50, yData));
    errChk (CA_VariantSet2DArray(&xVt,CAVT_DOUBLE, 50,50,zData));
    errChk (CW3DGraphLib__DCWGraph3DPlot3DSurface(gGraph, NULL,xVt,yVt,zVt, CA_DEFAULT_VAL));
    //errChk (CW3DGraphLib_CWPlot3DPlot3DSurface (gGraph, NULL, xVt, yVt, zVt, CA_DEFAULT_VAL));
    errChk (RunUserInterface ());
    Error:
    /* clean up */
    sprintf(errCode,"%X",error);
    MessagePopup("",errCode);
    CA_VariantSetEmpty(&xVt);
    CA_VariantSetEmpty(&yVt);
    CA_VariantSetEmpty(&zVt);
    CA_DiscardObjHandle(gGraph);
    DiscardPanel (panelHandle);
    return 0;
    At this point, I am just trying to figure out which function to call and what to set the input Variants.  Seems somethings they are 1D and sometimes they are 2D.  Unfortunately the documentation is very slim and doesn't explain what the actual functions or variants represent.

  • Plot a 2D Graph as Date being on X-Axis

    hi all,
    I'm a quite a new bee to Java 2D an would like to know if there are any possibilities to plot a graph in java 2D with X Axis representing Date.
    I would need a graph somewhat like
    Y
    |_____
    | _______
    |
    |_____
    |
    |________________________ X Axis = Date ->
    I have to plot a graph which has a Blocks (consisting of Start & end Dates).
    So my graph looks like as shown above and starting point of my graph being the start date of Block & End point being End Date respectively.
    Any help in this regard will be highly appreciable.
    Thanx
    Ati

    import java.awt.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import java.text.*;
    import java.util.*;
    import javax.swing.*;
    public class PlottingData extends JPanel {
        int[] xVals;
        int[] yVals;
        final int MIN = 50;
        final int MAX = 100;
        final int PAD = 25;
        public PlottingData() {
            // Create a couple of "dates".
            Calendar start = Calendar.getInstance();
            start.setTime(new Date());
            Calendar end = Calendar.getInstance();
            end.setTime(start.getTime());
            end.add(Calendar.DAY_OF_MONTH, 16);
            DateFormat df = new SimpleDateFormat("dd MMM");
            System.out.printf("start = %s  end = %s%n",
                               df.format(start.getTime()),
                               df.format(end.getTime()));
            // Calculate the number of days in between.
            Date difference = new Date(end.getTime().getTime() -
                                       start.getTime().getTime());
            Calendar c = Calendar.getInstance();
            c.setTime(difference);
            int days = c.get(Calendar.DAY_OF_MONTH);
            System.out.println("days = " + days);
            // Instantiate xVals.
            xVals = new int[days];
            // Prepare to count from start to end in days.
            int startDay = start.get(Calendar.DAY_OF_MONTH);
            int endDay = end.get(Calendar.DAY_OF_MONTH);
            Calendar counter = Calendar.getInstance();
            counter.setTime(start.getTime());
            // Initialize elements of xVals array.
            for(int j = 0; j < days; j++) {
                counter.add(Calendar.DAY_OF_MONTH, 1);
                xVals[j] = counter.get(Calendar.DAY_OF_MONTH);
            //System.out.printf("xVals = %s%n", Arrays.toString(xVals));
            // Instantiate yVals array and initialize its elements.
            yVals = new int[days];
            Random seed = new Random();
            for(int j = 0; j < yVals.length; j++) {
                yVals[j] = MIN + seed.nextInt(MAX-MIN+1);  // [50 - 100]
            //System.out.printf("yVals = %s%n", Arrays.toString(yVals));
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            int w = getWidth();
            int h = getHeight();
            double xInc = (double)(w - 2*PAD)/(xVals.length-1);
            double yInc = (double)(h - 2*PAD)/(MAX - MIN);
            //System.out.printf("xInc = %.1f  yInc = %.1f%n", xInc, yInc);
            // Origin of graph:
            double x0 = PAD;
            double y0 = h-PAD;
            // Draw ordinate.
            g2.draw(new Line2D.Double(PAD, PAD, PAD, h-PAD));
            // Draw tick marks.
            for(int j = MAX-MIN; j >= 0; j -= 10) {
                double y = y0 - j*yInc;
                g2.draw(new Line2D.Double(x0, y, x0-2, y));
            // Label ordinate.
            Font font = g2.getFont();
            FontRenderContext frc = g2.getFontRenderContext();
            LineMetrics lm = font.getLineMetrics("0", frc);
            float height = lm.getAscent() + lm.getDescent();
            for(int j = 0; j <= MAX-MIN; j += 10) {
                String s = String.valueOf(j+MIN);
                float width = (float)font.getStringBounds(s, frc).getWidth();
                float x = (PAD - width)/2;
                float y = (float)(y0 - j*yInc + lm.getDescent());
                g2.drawString(s, x, y);
            // Draw abcissa.
            g2.draw(new Line2D.Double(PAD, h-PAD, w-PAD, h-PAD));
            // Draw tick marks.
            for(int j = 0; j < xVals.length; j++) {
                double x = PAD + j*xInc;
                g2.draw(new Line2D.Double(x, y0, x, y0+2.0));
            // Label abcissa with xVals.
            float sy = h - PAD + (PAD + height)/2 - lm.getDescent();
            for(int j = 0; j < xVals.length; j++) {
                String s = String.valueOf(xVals[j]);
                float width = (float)font.getStringBounds(s, frc).getWidth();
                float x = (float)(PAD + j*xInc - width/2);
                g2.drawString(s, x, sy);
            // Plot data.
            g2.setPaint(Color.red);
            for(int j = 0; j < yVals.length; j++) {
                double x = x0 + j*xInc;
                double y = y0 - (yVals[j] - MIN)*yInc;
                g2.fill(new Ellipse2D.Double(x-1.5, y-1.5, 4, 4));
        public static void main(String[] args) {
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.add(new PlottingData());
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • Designate data points in scatter plots

    Hey,
    I`ve made a correspondence analysis in excel and want to get a scatter plot as .eps-file.
    I`ve imported the X and Y values in Illustrator and created a scatter plot. Now I would like
    to represent the numbers of data points (like in the illustration below). Is this even possible?
    If so, how? Various tutorials didnt help.
    Thanks for the help!
    Heiko

    That's possible. See http://www.m-server.de/m_g/Scatter%20graph-cs5.ai.zip
    How to create a graph design:
    http://help.adobe.com/en_US/illustrator/cs/using/WS3f28b00cc50711d9fc86fa8133b3ce158e-8000 .html#WS714a382cdf7d304e7e07d0100196cbc5f-61a3a

  • Deleting specific data points from a scatter graph

    I cannot seem to figure out how to delete single points in a scatter plot to get rid of the outliers. Someone help me!

    I have never used Numbers.
    Can't you just delete the data on the source?
    The PhD research scientist in me makes me ask you if you are justified in deleting any data points? Even apparent outliers may represent a true data sample. Likewise, how do you know one of the "good" points isn't an aberrant sample that really belongs at an extreme? I would take care of outliers by reanalyzing the sample many times until I averaged it into submission. The only outliers I would outright delete were ones where I could truly question the quality of the analysis based on other data, or it it was truly impossible (e.g., a negative number of apples growing on a tree).
    One thing I would do would be make a scatter plot with one set of data and generate my line through it, then generate a second plot on the same page with the outlier data but not plot a line through it. The line would show the relationship I thought really applied but I was also up front about data I had rejected and still presented it for all to see.
    Message was edited by: Limnos

Maybe you are looking for

  • Long running mapping execution...?

    I have a mapping that selects from a 40+ milion row table over a database link but with the FILTER Operator I'm using it should only bring back about 20,000 rows. The mapping has been executing for over 2 hours :-( In checking the remote system, ther

  • Captivate 5.5 Clickbox

    Hello All, I have observed that a clickbox inserted from Captivate 5.5 with the following settings would result into a paused project. Action           On Success: <URL>                URL: <url> New (window)                      (unselected)Continue

  • Premiere Pro has encountered an error  [URGENT]

    I can´t open my recent project. I receive the following error Message: "Premiere Pro has encountered an error. [..\..\Src\Clip\MasterClip.cpp-2802]" Even if i want to open the auto-saved projects i get this error message. I tried to import the projec

  • Trying to export .MTS footage filmed in 1080i

    Hi, I recently bought a sony HDR-XR150 camcorder and am filming in HD FX 1080i and the quality is amazinggg when I hook it up to the TV via HDMI. but when I export the footage from iMovie '11 the image quality isn't nearly as good. I've tried exporti

  • Best HealthKit apps

    With the 'burgeoning' number of 'Health Apps, I am struggling to find a 'lean' (pun intended) set of apps that best integrates with 'Healthkit' with minimal overlap of data types - would welcome feedback/guidance - Thanks !