Spread out x-axis points to smooth out line graph

Hi guys,
I've been given some figures that I've displayed into a graph...However, there are some values that have been taken every 2 weeks and then there's like a 6 month gap. I'm wondering if it's possible to space out the dates relevent to duration in order to make the learn smoother. For example:
http://i29.tinypic.com/rcv8rr.png
If there was like 20 plots on the graph then the closer dates might be spaced out 0.2cm while the larger ones may be like 0.8cm etc.
Mike

Hi Mike,
OK - I have not found a simple function or chart setting that will "fill in the gaps" in the data. If anyone knows of one, let me know!
So, here's some more SQL for you:
Firstly, assuming that data needs to be shown weekly:
SELECT
NULL LINK,
Y.NEW_DATE LABEL,
CASE WHEN Y.NEW_DATE = Y.LAST_HIREDATE THEN Y.EMPNO
    ELSE ROUND((Y.LAST_EMPNO + (((Y.NEW_DATE - Y.LAST_HIREDATE) / (Y.NEXT_HIREDATE - Y.LAST_HIREDATE))) * (Y.NEXT_EMPNO - Y.LAST_EMPNO)),0)
  END VALUE
FROM (
SELECT X.NEW_DATE, E.EMPNO,
(SELECT TRUNC(MAX(E2.HIREDATE),'DAY') FROM EMP E2 WHERE TRUNC(E2.HIREDATE,'DAY') <= X.NEW_DATE) LAST_HIREDATE,
(SELECT MAX(E3.EMPNO) FROM EMP E3 WHERE TRUNC(E3.HIREDATE,'DAY') = (SELECT TRUNC(MAX(E4.HIREDATE),'DAY') FROM EMP E4 WHERE TRUNC(E4.HIREDATE,'DAY') <= X.NEW_DATE)) LAST_EMPNO,
(SELECT TRUNC(MIN(E5.HIREDATE),'DAY') FROM EMP E5 WHERE TRUNC(E5.HIREDATE,'DAY') >= X.NEW_DATE) NEXT_HIREDATE,
(SELECT MIN(E6.EMPNO) FROM EMP E6 WHERE TRUNC(E6.HIREDATE,'DAY') = (SELECT TRUNC(MIN(E7.HIREDATE),'DAY') FROM EMP E7 WHERE TRUNC(E7.HIREDATE,'DAY') >= X.NEW_DATE)) NEXT_EMPNO
FROM (
SELECT (SELECT TRUNC(MIN(HIREDATE),'DAY') FROM EMP) + ((LEVEL - 1) * 7) NEW_DATE
FROM DUAL
CONNECT BY (SELECT TRUNC(MIN(HIREDATE),'DAY') FROM EMP) + ((LEVEL - 1) * 7) < (SELECT MAX(HIREDATE) FROM EMP)
) X
LEFT OUTER JOIN EMP E ON TRUNC(E.HIREDATE,'DAY') = X.NEW_DATE
ORDER BY X.NEW_DATE
) YOr, monthly:
SELECT
NULL LINK,
Y.NEW_DATE LABEL,
CASE WHEN Y.NEW_DATE = Y.LAST_HIREDATE THEN Y.EMPNO
    ELSE ROUND((Y.LAST_EMPNO + (((Y.NEW_DATE - Y.LAST_HIREDATE) / (Y.NEXT_HIREDATE - Y.LAST_HIREDATE))) * (Y.NEXT_EMPNO - Y.LAST_EMPNO)),0)
  END VALUE
FROM (
SELECT X.NEW_DATE, E.EMPNO,
(SELECT TRUNC(MAX(E2.HIREDATE),'MONTH') FROM EMP E2 WHERE TRUNC(E2.HIREDATE,'MONTH') <= X.NEW_DATE) LAST_HIREDATE,
(SELECT MAX(E3.EMPNO) FROM EMP E3 WHERE TRUNC(E3.HIREDATE,'MONTH') = (SELECT TRUNC(MAX(E4.HIREDATE),'MONTH') FROM EMP E4 WHERE TRUNC(E4.HIREDATE,'MONTH') <= X.NEW_DATE)) LAST_EMPNO,
(SELECT TRUNC(MIN(E5.HIREDATE),'MONTH') FROM EMP E5 WHERE TRUNC(E5.HIREDATE,'MONTH') >= X.NEW_DATE) NEXT_HIREDATE,
(SELECT MIN(E6.EMPNO) FROM EMP E6 WHERE TRUNC(E6.HIREDATE,'MONTH') = (SELECT TRUNC(MIN(E7.HIREDATE),'MONTH') FROM EMP E7 WHERE TRUNC(E7.HIREDATE,'MONTH') >= X.NEW_DATE)) NEXT_EMPNO
FROM (
SELECT ADD_MONTHS((SELECT TRUNC(MIN(HIREDATE),'MONTH') FROM EMP), LEVEL - 1) NEW_DATE
FROM DUAL
CONNECT BY ADD_MONTHS((SELECT TRUNC(MIN(HIREDATE),'MONTH') FROM EMP), LEVEL - 1) < (SELECT MAX(HIREDATE) FROM EMP)
) X
LEFT OUTER JOIN EMP E ON TRUNC(E.HIREDATE,'MONTH') = X.NEW_DATE
ORDER BY X.NEW_DATE
) YI appreciate that these are a tad complicated but they are based on a simple principle:
This will create a table of dates for the first day in each month for the next 6 months:
SELECT ADD_MONTHS(TRUNC(SYSDATE,'MONTH'), LEVEL-1) MONTH_BEGIN
FROM DUAL
CONNECT BY LEVEL <= 6Similar, but for every month from now until the end of next year:
SELECT ADD_MONTHS(TRUNC(SYSDATE,'MONTH'), LEVEL-1) MONTH_BEGIN
FROM DUAL
CONNECT BY ADD_MONTHS(TRUNC(SYSDATE,'MONTH'), LEVEL-1) < TO_DATE('31/12/2010','DD/MM/YYYY')These are two examples of how to create virtual records using a loop. LEVEL indicates the current iteration number and CONNECT BY acts like a WHILE statement
Using such records, we can link to existing data using a LEFT OUTER JOIN. This way, we keep all the dates and populate ones that have actual values. For all records, I'm noting the last actual date/value that exists before it and the first actual date/value that exists after it. This gives me a complete set of data. Leaving it at that stage, it pretty much where my last post's statement was.
I have now extended this to perform a calculation based on how far between two actual values the current record is - based on the dates. This then gives me a percentage that I can add to the last know value to get a derived value that will fill the gap.
I have used the "Monthly" sql version here: [http://apex.oracle.com/pls/otn/f?p=9568:11] Which will, hopefully, make things a bit clearer as you can see the actual values in a report on the right but the filled in values in the chart
Andy

Similar Messages

  • Problem in setting axis(x and y) in line graph

    Hi All,
    I have a database table student with two column score(number data type) and "no of student"(number data type). With this table I want a jsp line graph which will describe the student table.Score col would be in X axis and the other one in y axis.I am not able to set score in x axis. I am using JDeveloper 10.1.3.3.
    By using scatter graph I am able to set score in x axis and "no of student" in y axis.But my requirement is line graph.So, is there any way to achieve a line graph where score would be in x axis and "no of students" would be in y axis?
    Can any body help me regarding this matter?

    Hi,
    If you are still looking for the solution to this, you can change the graph to display the way you require.
    If you have a graph def file like BIGraphDef1.xml you need to select it in the application navigator. Then in the Structure window select the top level (ex. BIGraph1). This will give you the options available in the property inspector.
    If you change the dataRowShownAsASeries from True to False, you should be able to display your data in the line graph.
    Peter

  • ADF11g: dvt, line graph x-axis (o1 axis) display issue

    Hi,
    In our application we are generating line graphs for a set of data.
    This graph is plotted in between 2 sets of numeric values. (one plotted on x-axis and other on y-axis).
    For better accuracy of plotted graph we are using these numeric values upto 7 decimal places. (for example 8.1234567)
    Now when graph is plotted, then on x-axis (that is o1- axis in case of Line Graph) the tick labels are showing upto 7 decimal places.
    Is there any way so that I could control the display of these tick labels to 1 decimal place instead of 7 decimal places?
    More Info:
    ++The tick labels for x and y axis are generated at runtime by some calculation logic.++
    ++If we set the tick labels for x axis to 1 decimal place instead of 7 decimal places when they are generated , then this will lead to build in accurate graphs.++
    ++So we can't control the decimal format of tick labels when they are generated. We need to control it when they are displayed.++
    Please help...
    Thanks and Regards
    Manav Ratra

    Hi Frank,
    this is not working :( . It holds good for the case where one has to display markers (tick labels) on the lines of line graph and not the tick labels on the axis.
    Moreover here i find out tag as *<dvt:x1Format>*
    where as line graphs does not support x1axis they have o1axis .
    In my case I need to control display of tick labels on the o1axis.
    Regards
    Manav Ratra

  • How to smooth out discontinuous spacial distribution gradients

    Hi all.
    I'm controlling a linear motion device, and need to generate displacement paths for it to obey. What I'd like is to smooth out the 'sharp edges' in my profile data (for example, at points where it may go from a slow forward motion to a faster forward motion). Technically, this is removing the discontinuities in the spacial distribution differential, but in other words all I need to do is "smooth my data".
    I've mimicked what I want to achieve by putting some hand-created numbers into this graph -->
    The yellow line is my original profile data. You can see that I'll be moving the device from position 45 at time 0 to position 52 at time 5 and finally position 53 at time 9. This is fine, but I'd like to smooth out the motion a bit and avoid that nasty elbow at time=5 a bit.
    The blue line is what I'd like. A smooth run from position 46 at time 0 to position 53 at 9 seconds, that preserves the velocities (gradients of the profile line) at the beginning and end. The reason for this is that the motor will arrive at position 46 (time 0) at the velocity inferred by the first gradient, and will continue beyond position 53 after time=9 at the speed inferred by the end gradient. Therefore I must not change the gradients of the line at the beginning and end.
    I've tried using the many Signal Filtering techniques LabVIEW has available, but I've found that they create problems:
    1. They don't preserve the beginning and end gradients, and
    2. They tend not to like the very few sample points I have here. (If I interpolote the yellow line to create intermediate points, the filtering works better, but still suffers from point 1)
    I've tried using the B-Spline curve fit, but that seems also not to respect the gradients.
    I've tried the cubic spline fit, but that doesn't return the extra points I need to create the blue curve the way I've shown here.
    Does anyone have any advice? I thought this would be simple, but I'm a bit stuck now but I suspect that there'll be someone out there that's had to do this too.Naively I expected there to be a simple function called "Smooth Data", but clealy not.
    Many thanks in advance for any responses received.
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

    In my copy of Haliday Resnick and Walker there was a note that talked about Einstein and "working in divine issolation" where he was not distracted by others telling what was leagl and what wasn't. I recall that note when I propose idea like the following that some math type will tell me has not physical meaning and dismiss it off-hand. But since I don't limit myself to what is allowed or legal...
    See this thread starting a post #5.
    Summary:
    CC's best attempt at smoothing the curve was shown in this plot.
    Using my non-legal technique, I got these results.
     I a nutshell:
    When yo ufilter you loose data at the front and back-end with the number of points of data loss being determined by the order of the filer. By first pre-pending and appending the same data set reflected about the first and last point, we trick math into telling us what it woudl refuse to tell us otherwise.
    maybe this will help you,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Oscillating amplidude waveform to be smoothed out, and calculate frequency of difference of original waveform

    a steep impulse of oscillating amplitude, i need to smooth out the waveform and calculate the frequency of difference of original waveform and smoothed waveform how to do this?
    i have tried to do with calculating moving average of the data points.
    i have attached the data points here with.
    Attachments:
    CASE03.DOC ‏1 KB

    Hello,
    I was not able to open the MS Word DOC attached to your post, so I am not exactly clear what your dataset looks like. When you say you have an oscillating input that is an impulse, do you mean that the waveform contains discrete jumps? If so how would you like to smooth the waveform?
    Can you please post two graphs, or two sets of datapoints which describe your input and output? By looking at exactly how a specific input should be translated to a specific output we should be able to give you a much more specific answer.
    Scott Y
    NI

  • Help me smooth out my lighting.

    What Setting do I need to change to smooth out the edges of my lighting in this shot, and get rid of those hard edges?

    I presume you're talking about the banding in the transition from dark gray to black.  There's only so much you can do, because there are so few values of gray being spread across a much higher number of pixels.
    The first thing to do: work in 32 bits.  It'll help even if you eventually render out to an 8 or 10-bit codec.

  • Smoothing out "slider" or "dolly" shots

    Looking for some help smoothing out camera slider shots. They are "side to side"( as opposed to straight in) and show some vibration during the move. I have tried reducing the vibration in Motion but the analysis constricts the video on the X axis and bunches the video to one side. This leaves a blank/ black canvas showing on half of the project. Any help with preserving the "move" while reducing the vibration/ camera shake?
    thanks in advance...

    If you're using the Stabilize behavior, restrict the direction to the vertical only.
    Andy

  • How to find out the calling point of a Badi

    Hi Experts,
    Say one Badi is getting called in a particular screen of a transaction.
    Can anyone please guide me how to find out the calling point for that Badi.
    I checked for transaction CC31 screen 2000, method IF_EX_ECM_EXIT~OMR_CHECK_01
    is getting called.
    But I could not find the calling point.
    Please help.
    Thanks,
    Sonali.

    Go in to the perticular method, and click on where used list.That may help.
    Or get into the method in debugging, and press F7. That will take you to the calling point.

  • Can I dump out the data point of a curve in the equalizer?

    Hi all,
    After using the equalizer, I would like to dump out the data point of the following curve. Is there any method to dump out the data points?
    Thanks a lot for your kindly help.
    Leo

    leo_chan wrote:
    I am sorry that I didn't state clear about my questions, My "dump out" mean to get the amplitude of the curve at different frequency. (say, 120 points / decade from 100 to 10000Hz)
    No, there is no way of doing that from any of the filter plugins - they don't calculate like that internally, so there would be no easy mechanism for doing this. Even if you looked at the preset data, you'd only find the setup conditions for each filter band, not the total responses. The only place you can do anything like this is the Frequency Analysis window. Because this does an FFT of the entire waveform, the data is available - hence the 'copy to clipboard' option.

  • How do you smooth out lines in Photoshop CS5

    I have some black and white line art drawings. The lines are not smooth and sharp, and instead have tiny jagged edges. I tried using the smudge tool, and that does smooth out the lines but it also makes the lines a little sloppy. That's probably how the Smudge Tool got its name. Is there a way to use this incredible software to create smooth lines? I've learned how to create paths, but I can't figure out how to use the paths to change the line art. Maybe this is what I'm looking for?

    Noel Carboni wrote:
    ...to use a Path then add a Stroke style, so that it remains editable?  .....
    -Noel
    If I understand your question correctly then the answer is yes. 
    You can create an arbitrary path whose shape, open or closed, can remain editable throughout your session and it can be duplicated if needed.  That path can then be stroked with a pixel painting or editing tool. Lets say you create a new layer and stroke a path with a colored brush. You can then add a style to that layer, move that same path and add a different stroke on a second layer and then duplicate the path, move it and edit its shape and then do yet another stroke and style on a third layer. This is what I've done in the image below showing the stroke & styled paths as well as the vector path in the bottom path.
    Once a path has been stroked to a layer and has had a layer style applied it is only editable as pixels, but the shape remains as a path which can re restroked or moved or reshaped so flexibility is high.
    Paulo

  • How to smooth out zooming/scrolling image that jerks (CS4)?

    Hi guys/girls,
    Is there any way that i can smooth out images that zoom in/out with normal classic tween. they are so jittery it looks terrible. I even have a little bit of easing and frames per second set to 30.
    any info much appreciated!
    Jeff

    Hi flashfever,
    thanks for responding. can you elaborate on how i can use that? is it AS for the 1st frame or on the movie clip itself? etc
    in this case, i have the image fading in and enlarging from 70% to 100% in the same tween. its very jerky.
    thanks for your help so far!
    Jeff

  • HOW TO- Smooth out your animation jittering and tearing

    I've found a couple of workarounds that will smooth out your animations. There are JVM arguments that you can pass that allow you to set the scenegraph animation framerate and vsync properties. Increasing the framerate pulse and settig vsync to true can smooth out most of the animation jitters we're experiencing. The downside is that this is going to cost you some CPU time.
    -Dcom.sun.scenario.animation.vsync=true  -Dcom.sun.scenario.animation.pulse=500I also saw that the JavaFX team has made solving these animation issues a top priority for the next release.

    Nah, forget it. This logo needs to be redrawn from scratch.
    Mylenium

  • Sharepoint 2010 User getting kicked out of share point multiple time , can some one help me what coule be reason

    using SharePoint 2010 > under marketing > task, user getting kicked out of share point multiple times. don't know the reason, does any one have any idea,  learning about SP,  any help will be appreciated.

    try this one:
    http://sharepointsolutions.blogspot.com/2008/06/how-do-i-make-our-sharepoint-site-stop_17.html
    if fixed the issue fine other wise could you please check the ULS logs/ application ?IIS logs at the same time user kicked out.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • How do you smooth out a coat?

    Having a hell of a time figuring out how to smooth out the arm of this coat. thanks

    One technique I like, which fits in with the frequency separation thing JJ talks about is this:
    1.  Switch to 16 bits/channel and a linear color profile.
    2.  Mask so just the arm is showing.  The Quick Select Tool works well for this.
    3.  Refine Edge to get it into a new layer
    4.  Do a Filter - Other - High Pass, choose a radius that shows the wrinkles, but not too large.
    5.  Image - Adjust - Invert.
    6.  Change the blending mode to Overlay and watch the tight wrinkles magically get smoothed out.
    To take it a bit further...
    7.  Flatten the above.
    8.  Mask the arm again, Refine Edge to make it a new layer.
    9.  Filter - Noise - Median until it is very smooth.
    10.  Hide the unnaturally smooth looking parts with a dark color in the mask.
    Something like this isn't too difficult to achieve...  Took me longer to write about it.
    -Noel

  • Problem smoothing out skin in Photoshop elements 13

    I frequently smooth out skin in photoshop..  I do this by Making a new layer,  doing a surface blur,  then adding a mask (little square with a circle in it up on the top right) then do Command I to invert it.. then use the paintbrush to take the skin to the blurred look..   All of the sudden it isn't working any longer?   I'm not sure if I clicked some weird setting that is making it not take the bottom layer off?   Anybody have any ideas?

Maybe you are looking for