DateTime XAxis rounded?

I see what appears to be some rounded problems with the Xaxis on a Waveformgraph.

I have attached a sample. The sampling interval has been specified as Mrs. 2 after application loads, press the right arrow to move the cursor to the next sample to see the problem. I expect to report a time of 14:28:31.0020 29/04/09 and it signals the milliseconds as 0019

I say the problem seems to be rounded because the divergence between the time I expect to see and the time indicated by the slider label expanded as we go further into the dataset. Note how the cursor not aligned on the second line that was drawn using the DataConverter.

I looked up the name of properties which may suggest a way to control the accuracy and have had no joy.

Maybe, I need to load the data differently...? I looked around for it too... once again... no joy.

Please help and thanks in advance.

Joe

Eric-

You pretty much have it. There are at least two problems as I see it.

Problems seem to apply only to the WaveformPlots with data to the millisecond intervals. The generation of data values X foot is a problem. Another problem is the default display of FormatString.FormatDouble behavior. I can't speculate how many underlying problems is committed between the problems that I see on the surface. I suspect that the logic that is used by the DataConverter.Convert function is involved, but I can only speculate.

WaveformPlot.PlotY - my assertion that foot correctly generates the values of X is a guess. I check by putting a breakpoint in the code after execution of WaveformPlot.PlotY that the values returned by the WaveformPlot.GetXData () were not accurate. It may all simply mean there is a problem with GetXData but I see consistency so I ruled that out. Similarly, after generating the cloud of points, I used a breakpoint to check the values that I have provided to the constructor of scatterplot were correct. Thing was, even with the correct values. I needed a FormatString custom to display the values of the dispersion diagram correctly. Also, after seeing that the cloud of points returned differently and seem to align the Xaxis differently, I had an idea, I've been to something.

FormatString.FormatDouble - after working through the makings of the foot/dispersion diagram that above, I still need to fix the display with the CustomFormatString values. I suspect that the logic used by the DataConverter.Convert function can also be involved in the default behavior of FormatString.FormatDouble. I applied the same principles used to generate the data of x for the cloud of points in the CustomFormatString.FormatDouble and I got a work around.

In addition, I tried the WaveFormPlot.PlotWaveForm and discovered the divergence within the WaveformPlot between the correlation of the plot with Xaxis and/or rendering between parcels created by foot and PlotWaveform. To my joy, PlotWaveform gave the results I need.

Hope that helps.

Thanks for your help.

Joe

Tags: NI Software

Similar Questions

  • DateTime on x-axis of the graph of the intensity

    How can the x-axis of a graph of intensity be configured to the DateTime data type, similar to the graphic waveform XAxis?  You can set the FormatString DateTime MajorDivisions, but has no way of installing the x-axis values.  Waveform curve has a foot (double [], DateTime, TimeSpan) function that will implement the XScale with the correct DateTime values, but the graphic intensity doesn't seem to have a similar capability.  I tried to configure the graphic intensity YAxis MajorDivisions DateTime Format string and pass then the plot function Tick values for the yScaleStart and YScaleIncrement, but it does not work probperly.  MS2012 release notes say that the curve of intensity has now an automatic formatting for displaying DateTime on axes X and Y.  I tried to use this feature to test the DateTime X and the ability to axis Y; However, the function of automatic formatting is not available for the chart of the intensity.  Any help is appreciated.

    Thank you!

    Jon

    Hello

    Try the following code piece.

                // Set the label format correctly            intensityYAxis1.MajorDivisions.LabelFormat = new NationalInstruments.UI.FormatString(NationalInstruments.UI.FormatStringMode.DateTime, "g");
                intensityYAxis1.Mode = NationalInstruments.UI.IntensityAxisMode.AutoScaleExact;
    
                double[,] data = new double[100, 100];
    
                for (int i = 0; i < 100; i++ )
                {
                    for (int j = 0; j < 100; j++ )
                    {
                        data[i, j] = (i + j) / (colorScale1.Range.Interval * 2);
                    }
                }
                // IntensityGraph only understands double values. But graph can interchange the data value from different types using the DataConverter provided by NI.
                intensityPlot1.Plot(data,
                    0,
                    1,
                    (double)DataConverter.Convert(DateTime.Now, typeof(double)),
                    (double)DataConverter.Convert(TimeSpan.FromDays(1), typeof(double)));
    

    It will be useful.

    Habim stone

    National Instruments

  • Non-contiguous date ranges - user painted XAxis - values?

    I need to solve a problem similar to the described problem here.

    I use a WaveformGraph. I would like to paint the Xaxis values myself. My thought (sorry), is that it would be nice to be able to override the XAxis class to replace the values displayed, because they are that is painted.

    The data displayed are your standard double rooms more variety of time with each data point representing a sample on a regular interval (2ms). I want to view the data collected for several days, but I do not want to show the gaps that will follow when relying on the real sample time. Instead, I thought I could put my values of x to the offset (ms) from the beginning and instead of paint on the xaxis offset values, do a little calculation of date to paint the date value, according to the needs. This would allow me to set the gaps as needed. Alas, I'm not finding an overridable event in XAxis.

    Is there another way for me to explore?

    Hello jsytniak,

    While it may not really meet your needs, I came upwards with an example rather far-fetched that I think that shows what you are looking for, and I hope you can find a few pieces of it useful.  Here is a screenshot of the final result:

    You will notice that at the point of transition, ago 20 seconds missing, who might as well be days. The code behind this example is below, with important bits highlighted:

    namespace CustomXAxis
    {
    partial class Form1: Form
    {
    public Form1()
    {
    myFormatString customFormatString = new myFormatString();

    InitializeComponent();
    xAxis1.MajorDivisions.LabelFormat = customFormatString;
    transitionAnnotation.Visible = false;
    }

    public static startTime double;

    private void button1_Click (object sender, EventArgs e)
    {
    AnalogWaveform[] dataWaveforms = new AnalogWaveform[2];
    dataArray double [] = new double [5000];
    Calendar of WaveformTiming = WaveformTiming.CreateWithRegularInterval (TimeSpan.FromSeconds (.002), DateTime.Now);
    AnalogWaveformPlotOptions plotOptions = new AnalogWaveformPlotOptions (AnalogWaveformPlotDisplayMode.Time, AnalogWaveformPlotScaleMode.Raw);
               
    for (int i = 0; i)< 20000;="">
    {
    If (i<>
    dataArray [i] = Math.Sin (i*.01) * 10;
    if(i==5001)
    {
    dataWaveforms [0] = AnalogWaveform. FromArray1D (dataArray);
    dataWaveforms [0]. Timing = calendar;
    }
    If (I > 14999)
    [i - 15000] dataArray = Math.Sin (i*.01) * 8;
    }

    startTime = (double) DataConverter.Convert (dataWaveforms [0].) Timing.StartTime, typeof (double));

    dataWaveforms [1] = AnalogWaveform. FromArray1D (dataArray);
    Timing = WaveformTiming.CreateWithRegularInterval (TimeSpan.FromSeconds (.002), DateTime.Now, TimeSpan.FromSeconds (5000 *. 002));
    dataWaveforms [1]. Timing = calendar;
               
    waveformGraph1.PlotWaveforms(dataWaveforms, plotOptions);

    transitionAnnotation.XPosition = startTime + 5000 *. 002;
    transitionAnnotation.Visible = true;
    }
    }

    public class myFormatString: FormatString
    {
    public myFormatString()
    : base (FormatStringMode.DateTime, "SS tt")
    {
    }

    Public Overrides Function FormatDouble (double value)
    {
    If (value< form1.starttime="" +="" 5000="" *="">
    basic performance. FormatDouble (value);
    on the other
    basic performance. FormatDouble (value + 10000 *. 002);
    }
    }
    }

    If you have any questions about my code, or if it doesn't really match what you are looking for, let me know and I'll be happy to continue to watch it with you.

    NickB

    National Instruments

  • FormatStringMode.DateTime, "mm: SS".

    Hello. I changed the x axis to display the SS in time interval using the following;

    grBurner.XAxes (0). MajorDivisions.LabelFormat () = New NationalInstruments.UI.FormatString (FormatStringMode.DateTime, "mm: SS")

    It worked well with the frequency of update to 1 Hz.

    Now the update is 4 Hz I show how the axis 1/4 seconds?  (mm: SS:?)

    Thank you

    Richard.

    Hi Nick

    No, it did not work. He put the label correct 01:30.00 = 1.5 min...

    When data is added to the curve of the index of time is out by a factor of 4. That is to say. four samples is 4 seconds 1 second No.

    Concerning

    Richard.

  • Help with Javascript rounded times

    Hello

    I was wondering if someone can help me.

    I have this code which doesn't seem to work. It is intended to round time only if the time by 1 minute.

    For example. If the time is listed as: 21:08 then it should turn up to 22:00.

    If the time is listed as: 21:00, then she must stay the same.

    The problem I have is that if the time is listed as: 21:00, and then is rounded to 22:00. but should remain at 21:00

    function roundUptoHour ($timestring) {}

    $datetime = new DateTime ($timestring);

    return $datetime-> change (' next time ' ")-> format('H').': 0 0';

    }

    format('H').': 0 0';
    }   
    
    function roundUptoHour ($timestring) {
            $datetime = new DateTime ($timestring);
            } $datetime-> modify ('-1 minutes');
            return $datetime-> modify ('next hour')-> format('H').': 0 0';
    }   
    
    function elapsedHours ($strStart, $strEnd) {
            $dteStart = new DateTime (roundDowntoHour ($strStart));
            } $dteEnd = new DateTime (roundUptoHour ($strEnd));
            $dteDiff = $dteStart-> diff ($dteEnd);
            {if ($dteStart > $dteEnd) {
                            return 24 - $dteDiff-> Format ("hour");
            } else {
                            return $dteDiff-> Format ("hour");
            }
    }  
    
    $timestart = "16:00";
    $timeend = "22:00";
    $hourcost = 10;  
    
    $totalhours = elapsedHours ($timestart, $timeend);
    $timestartrounded = roundDowntoHour ($timestart);
    $timeendrounded = roundUptoHour ($timeend);  
    
    echo "hours elapsed:". $totalhours;
    echo"
    time start: ". $timestart." Rounded to:(".$timestartrounded.") "; " echo"
    end time: ". $timeend." Rounded to:(".$timeendrounded.") "; " $timestart = "16:00"; $timeend = "22:01"; $hourcost = 10; $totalhours = elapsedHours ($timestart, $timeend); $timestartrounded = roundDowntoHour ($timestart); $timeendrounded = roundUptoHour ($timeend); echo"
  • OSB - current-DateTime

    Currently, I am trying to establish a current-DateTime and have found that XSLT 2.0 is not supported.

    I have had recourse to the use of Java, but it has a problem. Here's my XSLT:


    < xsl: value - of select = "format: java (java: java.text.SimpleDateFormat.new ('yyyy-MM - ddTHH:mm:ss')", java:java.util.Date.new()) "/ >)"

    "It breaks, because the ' t ' pointing both starting breaks the SimpleDateFormat. Trying to put apostrophes or & apos; the XSLT transformation T break round.

    Someone else finds a way to be current-DateTime in the OSB?

    Trying to put apostrophes or "all about the T break the XSLT

    You can put ' in the clause select xslt by fleeing it properly
    For 't', try this
    Concat (& e quot; & quot;,
    ' T ',
    (& quot;' & quot;)

    remove the space between & and quot

    Published by: atheek1 on December 15, 2010 07:36

  • Distance and rounds of training swimming errors

    Hello...

    I have the new Apple Watch series 2. I make the swim in our pool inner community twice a week, and I used the new watch swimming twice now. Both times the watch Gets the distance of towers and evil. Here are some details:

    Our community pool is 25 yards - long we checked this by measuring it ourselves. I use the session pool swim.

    The first time I used the watch, I swam 44 laps, which is 1 100 yards. Training app reported that I had made 62 laps and 1 550 yards.

    The second time (today), I swam 50 laps, which is 1250 yards. Training app reported that I had made, 80 laps and 2000 yards.

    I always swim in the same way,-1 lap breaststroke of 2 rounds side stroke, rear race 1 lap. Then, again. I don't have flip turn.

    Any ideas or help greatly appreciated.

    Hello

    I suggest that raise you this issue with Apple supports, taking advantage of your initial 90 days of free technical support by phone of the coverage:

  • How to round the corners of the webpage of the tabs in Firefox?

    I am accustomed to having rounded edges on the tabs of the Web page in Firefox. I work in Windows 8, and the legs are square. What can I do to change their appearance?

    Do you use the extension classic restaurateur theme?

    • Firefox, the menu/Tools button > Modules > Extensions

    If this is the case then check the appearance of the tab settings.

  • I want the complete addressing information to appear at the top of the original message I answer, not only the line ' on &lt; DateTime &gt;, &lt; sender &gt; wrote:

    I can't find the configuration option in Thunderbird to have the following information added on top emails to that I answer:

    From: sender original >

    Sent: < DateTime >

    Up to: < list of original recipients >

    Initially copied recipients CC: < list > (if applicable)

    Subject: < email-subject original >

    Priority: < priority of the original message > (if applicable)

    Sensitivity: < sensibility of the original message, i.e., private, confidential, etc. > (if applicable)

    This information appears on the email I forward, but on my answers that I always get is a line that reads:
    ' On < DateTime >, < sender > wrote:

    Can someone help me with this?

    Thank you!

    This module allows you to create custom response headers:

    https://freeshell.de//~kaosmos/changequote-en.html

    Tested and functional in 38 TB.

  • rounding of Firefox buttons display problem

    Hello

    It seems that Firefox has issues with the rounded buttons (AFAIK).

    I'll post some screenshots to demonstrate:

    http://screencast.com/t/EJ2wIJMrna

    a refresh of the page itself, produces different artifacts of the same nature:

    http://screencast.com/t/NBqrrqTQVp8

    Sometimes, if you refresh a page enough times, you might not get these artifacts.

    The Web page on the screenshots is: https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius but I saw this question on a lot of pages, sometimes even on the Google search page.

    I am running the most recent version, official, stable Firefox, but I noticed this problem for at least the last 2-3 versions of the browser.

    You can try disabling OMTC and leave hardware acceleration in active Firefox.

    • topic: config page: layers.offmainthreadcomposition.enabled = false

    You can open the topic: config page via the address bar.
    You can accept the warning and click on "I'll be careful" to continue.

    You can try to disable hardware acceleration in Firefox.

    • Tools > Options > advanced > General > Browsing: "use hardware acceleration when available.

    You will need to close and restart Firefox after enabling/disabling this setting.

  • Just updated Firefox to update with new rounded tabs... How can I switch to old square tabs?

    Just updated Firefox to update with new rounded tabs... How can I switch to old square tabs?

    Many of us use

    Restorer Classic theme (Customize Australis)

    Restore the tabs squared, appmenu, modules, small display bar icons and more on Australis UI (Windows/MacOSX/Linux + Fx 29 +).

  • Adding accents for Pinyin El Capitan 10.11.5. I don't have a pinyin tonal accents 3 which looks like a rounded only on the bottom or slightly flattened v U.

    Adding accents for Pinyin El Capitan 10.11.5. I have no accent mark tonal pinyin 3 which looks like a rounded v only on the bottom or a little flattened U. I tried using simplified pinyin but makes me Chinese characters when tapped. I found a keyboard in the system of preferences that has this accent mark however the accent mark appears to the right of the typed letter emphasis must be on the letter typed. Any ideas?

    Best regards Raymond

    To type pinyin normally you use the ABC Extended keyboard layout (formerly US extended).  A list of the shortcuts is to

    http://symbolcodes.TLT.PSU.edu/accents/codemacext.html

    3 Tone is the caron, who is really a form of v.

    You shouldn't have any problem getting it above the letter, if you use the v option, then the vowel in ABC Extended.  ǍĚǑǓ

  • Round amount upwards or downwards by the numbers?

    I'm pretty new to numbers v3.6.2 so while I am very proud of my success with my effort first, very ambitious, I know I'll be defeated by a combination of the FI and around formulas. Then help with the following query gratefully received it please:

    I want to turn a series of cells upward or down to the nearest round number according to them being below or above the median.50.  IE: 16.34 becoming 16 and 16,79 become 17.  The cells can contain up to six figures (plus the two decimal points.)

    Please treat me as a novice and provide the complete formula!  Thank you very much.

    There is a function in figures aptly called "ROUND()" that takes two arguments:

    Round (number, places)

    num is the value to round

    places specifies how many digits to round

    assuming that the data is in cell A1, you can round the value as follows:

    = round (A1, 2)

  • Numbers rounded to a certain extent the price

    3.6.1 numbers question: I need help with a formula of round our price to xx.95 results. Where each product is an avec.95 price. I tried roundup and ceiling and cannot understand it. Thank you very much!

    Bill,

    Here is a simple solution that has a hole (in my opinion):

    column A contains the current prices and B contains the values "corrected".  From line 8, you can see that the prices are reduced by this method.  What is your intention?  You can share what you want the rule to the prices of the inputs between x.95 and x.99?

    the formula is:

    = INT (A1) + 0.95

    B1 = INT (A1) + 0.95

    This is the shortcut dethrone select cell B1 and type (tor copy and paste here) the formula:

    = INT (A1) + 0.95

    now select cell B1, copy

    Select cells B1 at the end of column B, paste

  • In the version 13, corners html fieldset are are more rounded

    Firefox v13 is not rounded the corners of the fieldset, html... even with the CSS commands
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;

    Any solution?

    Has been discussed here:

    https://support.Mozilla.org/en-us/questions/927769

Maybe you are looking for