Disappearing plot line when zoomed

I am having a problem with my CNiGraph plot line disappearing when the axes min and max are explicitly defined and they are substantially smaller than they would be if the graph were autoscaled.  I am using measurement studio 8.6.1.465 and NiDaqmx 9.0.2 on windows XP.  I am controlling axis scale either by SetAutoScale() or SetMinMax().  My code is rather large, so I am including snippets of what I am doing below.    
I noticed a thread with a similar problem at:
http://forums.ni.com/ni/board/message?board.id=232&message.id=3769&query.id=1275984#M3769 
Please help!  I have tried window invalidation, turning on/off immediate updates to the graph, setting axes visible/invisible, etc.
-drew 
Setup code:
        CNiPlot plot = m_pGraph->GetPlots().Add();
        CNiCursor cursor = m_pGraph->GetCursors().Add();
        //cursor.SetSnapMode(CNiCursor:napPointsOnPlot);
        cursor.SetSnapMode(CNiCursor:napNearestPoint);
        cursor.SetVisible(true);
        cursor.SetPointStyle(CNiCursor:ointCross);
        cursor.SetCrosshairStyle(CNiCursor::CrosshairNone);
        cursor.SetColor(CNiColor(255,255,255));
        cursor.SetPlot(plot);
        CNiAxes axes = m_pGraph->GetAxes();
        CNiAxis xAxis, yAxis;
        xAxis = axes.Item(1);
        yAxis = axes.Item(2);
        yAxis.FormatString = ".##e";
        xAxis.FormatString = "hh:nn:ss";
        CNiColor lineColor(m_plotArray[i]->m_lineColor);
        plot.LineColor = lineColor;
        plot.XAxis.GetTicks().SetMajorGrid(true);
        plot.YAxis.GetTicks().SetMajorGrid(true);
        plot.XAxis.GetTicks().SetMajorGridColor(CNiColor(60,60,60));
        plot.YAxis.GetTicks().SetMajorGridColor(CNiColor(60,60,60));
    m_pGraph->ChartLength = m_graphLength;
    m_pGraph->ChartStyle = CNiGraph::ChartStrip;
    m_pGraph->SetImmediateUpdates(true);
Graphing:
CNiReal64Matrix newData;
m_pGraph->GetPlots().Item(i+1).ChartXY(newData);
m_pGraph->GetCursors().Item(i+1).SetPosition(newData(0,maxCol),
                                                                    newData(1,maxCol));
Solved!
Go to Solution.

I managed to fix this problem, noticing that panning the graph caused the line to redraw properly.  I added a very small amount of 'jitter' to the X axis each time after ChartXY is called. Since autoscale mode seems to refresh just fine, i only introduce jitter if the axis min/max is set explicitly:
if (!m_pGraph->Axes.Item("XAxis").GetAutoScale()){
        static double plusMinus = 1.0;
        m_pGraph->Axes.Item("XAxis").SetMinMax(m_pGraph->Axes.Item("XAxis").GetMinimum()+(plusMinus*0.000000001),
                                                m_pGraph->Axes.Item("XAxis").GetMaximum()+(plusMinus*0.000000001));
        plusMinus *= -1.0;
It seems this is a bug in the graph control since there is no problem with the cursor drawing properly and I should not need to write code like this to keep my plot lines from disappearing?
-drew

Similar Messages

  • How do I stabilize shimmering fine lines when zooming or panning?

    I just completed an HD video that was exported in Standard Definition (SD) using Apple ProRes 422 codec. The video came out fine except when the clip of a JPG image zooms in or out using the zoom motion controls. The fine detail "shimmers" or "flutters", especially when zooming at a point when the image is nearly all the way zoomed out. (the fine detail is the smallest, then.) This is not a typical de-interlace problem where the whole image is highly erratic. The disturbance only happens on the fine detail in the JPG; the thicker lines are not affected. I applied a de-interlace filter and then separately applied a de-flicker filter. Neither of these filters had any effect. I was told by a highly regarded technician at our local access station who I would evaluate as an expert in FCP that this shimmering affect for fine detail was normal, especially in SD. HD, he said, will greatly reduce but will not eliminate it.
    Does others have thoughts about this and possible solutions? Thank you

    The flickering is an artifact of the two field structure of interlaced video. It is a result of very thin (often horizontal) elements that exist on one scanline as is common in text or titling. This can also be the case in images with great deal of detail with high contrast as well as when when you are engaged in pan/zoom moves on stills.
    As the alternate fields play, the flashing element is essentially being turned on/off. The basic strategy is to get the element to exist over two scanlines so it is refreshed every time the field plays or to reduce the amount of contrast so the difference between ON and OFF is not noticeable.
    Before you start any of these steps listed below, make sure you are viewing your material on an appropriate monitor. If you are working in an NTSC/PAL interlaced format (eg DV) you need an external TV monitor - not a computer screen. Without the appropriate device, you are playing blind.
    Things to try (In increasing order of image degradation)
    • (in FCP) field order>none
    • (in FCP or Photoshop) reduce whites by 10% - reduces overly bright areas
    • (in FCP) flicker filter - minimum
    • (in Photoshop) motion blur>vertical> .2 - .5 pixels - blurs vertically only
    • (In FCP or Photoshop) Gaussian blur> .2 - .5 pixels -blurs both horizontally as well as vertically
    • (in FCP or Photoshop) deinterlace - throws away half the image and is generally not appropriate on scanned images
    Remember: Unless you are viewing your work in the appropriate external NTSC/PAL monitor, you are playing blind. The computer monitor only shows you a proxy image.
    One final thought, if you have slowed your material significantly, and have not used some sort of frame blending/optical flow processing, you may be simply duplicating frames to create the additional material to pad the playback. The flashing you see is the result of this.
    good luck.
    x

  • White lines when zooming picture

    How i can remove this lines? Because when im zooming in picture very closly they appear and i cant see pixels and its just confuse me.

    Thanks those lines really annoyed me

  • Can't change plot line style for chart

    I am using LabVIEW 8.6. In my program, the user has the ability to enable or disable autoscaling for the x axis by right clicking the chart. I use a proprty node to turn the plot to a dashed line during an alarm condition. The issue I have is - if x autoscaling is disabled, the plot style is always solid for new data entering the chart regardless of the property node setting. If autoscaling is enabled, the line style changes as I expect.
    Attached is a simple program that illustrates the problem. I don't know if I am doing something wrong.
    Any comments will be appreciated.
    Thank you,
    Dave F
    Attachments:
    chart line test LV8.zip ‏10 KB

    Hi Dave, 
    I looked at your VI and I definitely see the behavior you mentioned.  However I believe this is expected.  The plot is actually still writing in the dashed line, however very compactly.  You can see this if you make your x range smaller(perhaps 0 to 10).  This shows the dashed line.  With autoscaling turned on, the graph is redrawn every loop iteration.  so the dashed line is easy to see when zoomed out.  
    I think a better solution for what you are trying to use plot color, line width, etc. Or if you definitely want it to do Line style, you can have it change line style to 0 and then back to 1 every loop iteration.  This will force it to redraw, but will add overhead to your code and slow it down slightly.  
    David_L | Certified LabVIEW Architect
    LabVIEW Tools Network | LabVIEW Tools Network Developer Center

  • A 1 pixel gap appears on webpage on the ipad or when zoomed on a Mac with Firefox 4

    I'm having an issue with a website having a 1 pixel gap under various OS's and browsers.
    http://www.coffeeandcream.ca/
    When viewed on an iPad it shows a 1 pixel gap on the right side of the link icons.  When you zoom on the iPad, the gap disappears and reappears at random zoom factors.
    When viewed on my Mac Pro under Firefox (version 4) it is fine to start, but when zoomed, random images have the 1 pixel gap sometimes above and below or to the left or right or sometimes both above/below and left/right.
    I'm not over worried about the behaviour of Firefox...since it is only when the page is zoomed.
    When I view it on my Windows PC, I have no issue with the gap under Firefox 3 or 4, or IE.
    Any thoughts on what is going on?
    Thanks in advance,

    Have you thought of entering the following code at the very top of your CSS file?
                    margin: 0;
                    padding: 0;
                    border: 0;
    This should reset the browser of your iPad and FF in Mac.  I use neither so I can't test it at my end.  the above code is not likely to affect any other standards compliant browsers.
    hth

  • Unwanted lines when using effects.

    Having much trouble with unwanted thin lines when using outlined text with multiple effects - outer glow & bevel and emboss. Typically the lines show through the outer glow effect in the color of the background. It is then especially noticable with the darker background I used for this layout. The lines are not visible on screen but show up in printing. I have also tried saving as PDF and then printing but no difference.
    Here is a scanned portion of the layout.
    Any help would be greatly appreciated!

    The transparency flattener preset was set to medium resolution.
    If it's transparency stitching then the flattener preset you use in the print driver would make a difference. Try High resolution or make a flattener preset that has a heavier raster balance. Here's a flattened PDF/X-1a test with low res vs. a customized high res:
    The custom flattener on the left has no stitching at any zoom view

  • Why does my photoshop keep giving black and white lines when I use my lasso tool?

    why does my photoshop keep giving black and white lines when I use my lasso tool? It has never done this before last night. It filles the Whole lasso seleted box with (what it almost looks like) black and white caution lines. then when I go to zoom out, my zoom option starts to mess up where you cant click and move your mouse to zoom in/out with ease but where you have to click to zoom out (many times).
    Can ANYONE help me?

    I am using CS5, WIndows 7, I am not sure how to tell if my drivers are up to, and I am more than happy to screen shot it.

  • 3d plot line thickness

    How does one change the thickness of individual lines in 3DLine Plot? I am able to use 3D Graph Properties -> Plots -> Overlay to change the thickness of all lines, but can't figure out how to change individual lines. Is it even possible?

    Hello jmountney,
    The overlay for a line can be set on a plot-by-plot basis, and you can do this either via the 3D Graph Properties window (right-click>>3D Graph Properties) or via property nodes.  There are a couple things to keep in mind:
    1) The overlay is assigned to a given plot index.  The best way to set up indices is in the 3D Graph Properties window.  The Plots tab will allow you to assign plot IDs and overlay styles for each index.
    2) You'll need to build each line you want to manipulate separately as its own plot.  This is done by specifying a Plot ID when using the create_plot_line function.  I would recommend pre-assigning Plot IDs for the range of plots you anticipate using in the 3D Graph Properies window.
    3) You can configure overlays dynamically (at runtime) via property nodes.  Set the plot index you want to modify using the Active Plot property, then change the overlay parameters.  Any changes you make will affect the current Active Plot.
    4) The plot ID is NOT equivalent to the plot index.  The plot ID is the number displayed in the 3D Graph Properties window and is the number you use when specifying a plot to add a vector to (This can be any positive or negative integer).  The plot index is the index of the plot ID array. If you specify a Plot ID that's not currently in use at runtime (wire an unused number to the create_plot_line function), it will create and occupy the next available plot index. This means that unless you assign plot IDs in sequence (0,1,2,3...) the Plot IDs will not match the plot indices.  Just something to keep in mind. 
    Hope that helps!
    Tom L.

  • Plot line on CNiGraph3D object

    Hi
    I am adding some new feature into the existing code that use CNiGraph3D to display data. The data is some amplitude associated with it's location of scan (x and y). The existing code scan data from a whole area, so the graph is filled. But the new feature will scan data from just a path (eg line). So I wonder if there's a way to plot line data on CNiGraph3D object.
    For example, I have this sequence of data (represented in x,y,amplitde)
    (5,17,3.6)
    (6,15,-9.2)
    (7,14,4.9)
    (6,12,-0.27)
    (5,10,-2.45)
    I would like to plot this data on CNiGraph3D. The graph is 10 units wide on x axis, and 20 units tall on y axis. And different value of amplitude will be plotted in difference color on Z axis.
    creating a matrix of 10x20 and fill the remaing coordinates (aside from those 5 coordinates above) with some constant value (0 or something else), but it's kind of waste of memory (my real code would be so much bigger than 10x20). So I wonder if there's any alternative way to plot this kind of data on CNiGraph3D?
    Thanks

    The main difficulty is to calculate the X position from the click position. First, you have to find the position in the graph pane. The left position of the pane is obtained by subtracting the width of the Y scale to its left position. Then there are some basic calculations to convert the click relative position to the corresponding X value, using the scale min and max.
    The second point is to create a cursor. Use the "Cursor list" attribute, which is an array of all the available cursors properties, and append a new one to the list.
    Attached is a simplified version of a tool I developed some times ago with the same goal.
    It answers to questions you didn't ask :
    - How can I move an existing cursor without creating a new one each time I click on the graph ?
    answer : the cursors are only created when you hold down the key while clicking
    - How can I remove a cursor ?
    answer : hold the key down while clicking close to the cursor you want to delete.
    Have a look at the way the closest cursor is detected, by calculating the distance between the click position and the cursors.
    Since I still have difficulties with the size of the attached documents, the vi is divided in several subs.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Graph cursors.vi.zip ‏19 KB

  • Can a plot line width be larger than level 5

    When I programming in Labview 6.1, in the property of plot, I found the line width only have 5 level. In my case, I need a much thicker plot line than level 5. Is there anyway to realize increasing the line width beyond the 5 options provided in Labview?
    Really thank you if you can help me.

    You can programmatically thicken lines by creating a duplicate data plot that is offset from the original.  Then use the Plot.FillTo property node and fill between the original and the duplicate.
    I back saved the example from LV7 to 6.1, but I have no way to test it on 6.1
    2006 Ultimate LabVIEW G-eek.
    Attachments:
    THICK.vi ‏18 KB

  • Autoscale Y only over displayed range when zoom X axis

    When a graph is zoomed over only its X axis, the Y range retains its values for the entire data range.  I'd like the Y range to be adjusted and scaled for only those Y values now plotted on the zoomed graph.  Is it possible to have this happen automatically without resorting to code to accomplish it ?

    I asked NI about this then I had some problem and was using 7.0. The message was that this was not a bug. So then you use autoscale Y on a XY graph it uses the full range to calculate the scale settings. I some sort of fixed this way. This is perhaps fixed in later versions
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    Ysacle_fit.llb ‏78 KB

  • Keep stroke weight when zooming into a comp

    Hello
      I am building an animation which depicts the building of an element in Photoshop using grid, guides, and bezier paths. I need to represent these items graphically, and not using a screen grab animation.
      I need to zoom into a comp up to 800% and show how paths and grid are manipulated in pixel-perfect work. When zooming in, the paths that show the grid and the bezier paths must stay at 1px in width at all zoom levels.
      I'll be creating "bezier" strokes using the path tool in AE. I'll be applying a line weight to it in order to show the strokes. When I zoom in, the strokes need to stay the same weight.
      What's the easiest way to accomplish this?
    Thanks,
    ------------S

    You would link the stroke width of e.g. a shape layer to the zoom/ scale with a linear() expression.
    linear(zoom,startzoom,endzoom,startwidth,endwidth)
    Fill in values as needed. The actual zoom varable could be linked to a slider ir the scale of the pre- comped main animation in the parent comp...
    Mylenium

  • Lightroom 5.2 BLURRY When Zooming and Moving

    EDIT: Updating to 5.5 seemed to have fixed this. FINALLY!
    Now when panning around while zoomed in, it no longer pixelates.
    This was not in any previous versions or 5.2 RC. Happens in the develop module.
    1. Everytime I zoom in or out, the image goes BLURRY for a second.
    2. Then when zoomed in and I click and drag, it say's sharp except on the edges that where not in view which get's pixelated, but when I let go of the mouse button, the entire picture goes blurry for 1-5 seconds. Even if I click and drag only 1 pixel over it blurs the entire photo.
    3. It also sometimes does it when  tapping \ to show before and after it goes all blurry and lags before it shows the before.
    4. It does it when  clicking back and forth from one image to another in the photo strip.
    Before it use to be zooming in would look mildly pixelated for a moment, then when clicking and draginng only the edges out of view would look mildly pixeled for a moment. This is driving my nuts I've reinstalled lightroom, deleted the preferencees folder, optimised catalog. Not fixed. It's also slower than it use to be.
    Example. Sometimes the blur is even worse. Click to enlarge

    I solved my own issue.  I saw an article @ http://www.lightroomforums.net/showthread.php?19694-Spot-removal-tool-doesn-t-work-with-Wa com-Intuos-5-in-LR-5 that solved my issue.
    Step 1:
    Walcom Tablet Properties
    Step 2:
    Click on Customize and change the default line graph from this:
    Step 3:
    To this
    Step 4:
    Click OK.
    After that, my spot edit tool stopped freezing in LR 5.2 while i was using my intuos 5 pen.
    Prior to doing this, I also did the procedure listed here:  http://forum.wacom.eu/viewtopic.php?f=10&t=8036
    So it's possible that both need to be done in order for the freezing to stop.  I hope this can help others.

  • HT201956 Why does the right side of the menu bar disappear or blink when I turn on my epson XP200 printer?

    Why does the right side the menu bar disappear or blink when I turn on my epson XP 200 printer?

    I have also been experiencing the same problems. Mac user since 1991. I own various machines but this particular problem lies with a MacBook Pro 2008 using 10.5.4
    The laptop has two users. One is fine while one is not. A new user was created but upon logging in for the first time the right hand side of the menu bar blinked off and on just like the existing user. No hard drives have been connected. All files backed up via drag and drop wirelessly.
    Since this development I have been unable to get to my iDisk; it might be related or coincidental. Last night I re-entered my .mac/MobileMe account details whereupon I was presented with a message saying the machine had not synced before. Not true. It had been syncing automatically since the day of purchase March 2008. I wonder if there is a connection between somewhere deep down in the Library, updated versions for 10.5.4 and MobileMe. Somewhere along the line a combination of events triggered the tool bar to start blinking...
    It's strange how one user is fine (seldom used and DOES NOT have a MobileMe account) while the main one, me, is not fine (used heavily throughout the day and DOES have an active MobileMe account).
    At this point, I don't intend to re-install and start all over again (I've done this so many times with other machines over the years that I was hoping those days had finally gone based upon Apple's brilliant recent advancements).
    Any help or comments will be welcome.
    Cheers!

  • [LaserJet Pro 200 color MFP M276nw] only vertical lines when scanning, scanner broken?

    Hi all! I have a problem with the scanner in my HP all in one. If I scan (using the printer function or apples ImageCapture: same result) the output is just a lot of vertical stripes (in colors when in color mode). Not a trace of the image I try to scan. The lines are there even if i scan an empty white page. I see the stripes both when doing a preview scan and an actual scan. The problems are very similar regardless of if I use the flatbed or the feeder scanner (they are separate scanner hardware, yes?). I have updated to the latest software for the printer/scanner and I am connecting over bonjour via wireless. I am on Os X 10.9.1. Anybody having similar problems or is my scanner just plain broken? Thanks in advance!Jon

    , , I understand that both of you are seeing vertical lines when scanning from your Laserjet M276nw. First, make sure the printer is plugged directly into a wall outlet and not a surge protector. Now, so I know where to begin I'd need to know the following:If you are seeing the vertical lines when you copy as well as scan?Are you seeing the vertical lines when you copy from the flatbed? The document feeder? both?If you are seeing the lines from both the flatbed and the feeder are they in the same place?Once I know this I'll be better able to assist you.

Maybe you are looking for

  • Install Error ORACLE 9i on HP-UX 11.00

    ***HELP*** Hello, the installation of ORACLE 9i (9.2.0.1.0) database on a HP9000 with HP-UX11.00 (this machine has all kernel parameters rebuild and all recomended patches are installed) over remote shell (remsh) doesn't succeed. The following error

  • How do I install a new printer profile on CS4?

    Folder system has changed from CS3, and instructions I find on Web don't sync with CS4.  I'm working with an Epson R1800 and trying to get illford papers' profiles installed.  Suggestions including possible web link for me to follow would be much app

  • HT4561 I have a IMAC 7.1 with a Mac OS X v 10.5.8. Can I upgrade this machine to 10.6.8

    I have a IMAC 7.1 with a Mac OS X v 10.5.8. Can I upgrade this machine to 10.6.8 or to the latest MAC OS software version?

  • Need Web reporting settings

    Hi  Friends, I am working in BI 7.0 . Trying to execute simple Web reporting but can not display report in Internet explorer. I think between BI and Internet Explorer need settings. Anyone send me settings Details. Regards, Ram.

  • Monthly process chain ran twice

    Hello Friends, I have a scenario where I need to find the reason why a Monthly process chain which is supposed to run once a month ran twice on a particular month on the same day. I have already checked the relevant process chain using the transactio