Grid snapping in xy graph

hi
 i want to snap the grid in xy graph
i am plotting graph using mouse down event
now i want to snap grid on mouse down(means if i click any where the point will be entered on nearest grid)
regards
mazhar
Solved!
Go to Solution.

thanx smercurio
may be i have not describe my problem clearly.
let me explain first  the link of my post you reffered  the main problems of that post are two constant because when i change size of my graph i loose alignment of the cursor and entered position. after some time and debuging i fix that and make it generic(mean if some one change graph size the alignment will not take effect) see the property which replace that constant.
Message Edited by mazhar.ali on 02-18-2009 03:54 AM
Message Edited by mazhar.ali on 02-18-2009 03:56 AM
Message Edited by mazhar.ali on 02-18-2009 03:59 AM
Attachments:
cursor alignment.JPG ‏40 KB

Similar Messages

  • Illustrator cc 2014 grid snap problem

    Since Updating to the whole cc2014 suite last week, grid snapping in Illustrator has been terrible. Literally Nothing really snaps to the grid.
    Does anyone share this problem? Anyone has a solution to this?
    And Yes, i've turned off 'align to pixel grid'.
    I'm working on a mac with OSX 10.9.3 running.
    Thanks in advance!

    I'm having the same exact issue. Before I upgraded to Illustrator CC 2014 I was using Illustrator CS6 and resizing a rectangle that's *off* the pixel grid would snap it to the pixel grid correctly. The snapping to pixel grid is the main reason I use Illustrator for web UI design. There were some bugs in CS6, like if the artboard was not snapped to the pixel grid then all the elements on the page would be off the pixel grid at the same distance that the artboard was off. That was an easy fix - just realign the artboard to the pixel grid and all the rectangle objects would snap to the grid when resized. But with Illustrator CC 2014 nothing snaps to the pixel grid.
    HOW TO REPRODUCE:
    Create a new document.
    Go to Pixel Preview.
    Zoom in to pixel level.
    Drag a rectangle on the screen.
    As you can see - IT IS snapped to the pixel grid (it happens only on creation).
    Grab the free transform anchor point and drag it up and to the right.
    As you can see - IT IS NOT snapped to the pixel grid.
    Try to drag the corner to free transform it to snap to the pixel grid. It doesn't work.
    Try to snap it to the pixel grid - it doesn't snap.
    Try to snap it to the pixel grid - it doesn't snap.
    Profit? No.
    SCREENCAST:
    http://quick.as/y0rwhymv
    GIF:
    As you can see it's very hard to snap to pixel. And even when it looks like it snaps, it actually is not on the pixel grid line.
    cc2014_bug.gif
    IMAGES:
    Dragging new rectangle:
    1create.png
    Resize it using free transform - gets off the pixel grid.
    2drag.png
    Continue to try to snap it back to the pixel grid using the transform tool, but still doesn't work:
    3drag.png
    Rinse and repeat. Still really bad. Snapping to pixel doesn't work anymore!
    4drag-but-nothing.png
    As you can see there is no way of snapping a rectangle back to the pixel grid!! Here are my settings:
    5settings.png
    Illustrator team - PLEASE FIX THIS BUG! I love using Illustrator for web design and UI mockups, but this bug makes it almost useless. There's no way to create pixel perfect designs with this bug. I hope all the information I provided above helps pinpoint the bug. Thanks!

  • Points not obeying grid-snapping, or any snapping-rules where merged.

    This is my situation.
    1. Draw a line... It snaps to grid perfectly.
    2. Draw another line... It snaps to grid perfectly.
    3. Merge line1 with line 2 at one end... (It seems snapped to grid, but shows a "+" protruding connection so I zoom, and it is fine close-up...
    4. Move the point to a new grid-snap point to see if it draws better zoomed-out 100% without showing overlapping on this single point... However, now it snaps everywhere except onto the grid. Like all around the point, just not on the point. Now it will no longer snap to any grid-point or other point, always being "off". (This does not resolve by adding a new point and breaking the line. The whole line now refuses to snap to any actual point. It is always offset by an unsteady ammount/percent. Sometimes it is real close, sometimes it is about 50% between all snap-points.)
    Resolution = None... Never move points once set, and naver intersect a third line to a point, and never intersect one line with another.
    Results... everything looks misaligned, slightly off-angle, can not make any true aligned items, unless I use line-thickness 3, to hide the off-angles from misaligned points.

    This is what is happening, at a programming level...
    Once a point is "merged/union", at the intersection. That point it is now located, becomes an offset to the actual "Grid". However, (for some reason only on intersected lines), the offset interferes with snapping. It will SNAP, at your grid-distance, at a slight offset, never on the actual intersection. It starts to "snap", as if the grid is offset, staying on the lines, but invisible lines that are not the grid.
    The only resolution to get the line to go back to the grid, is to use the arrow-keys to bump it the 5.0-0.1 pixels it is off. (In my case with a 10px grid.)
    However, moving the point again, causes it to start snapping to the phantom-invisible grid-lines, and it will have to be nudged with the arrow-keys to push it back to an actual grid location.
    Also, however... This does nothing to resolve the zoomed-out view which shows top-left intersections displaying as a "+" when they are truly intersected. Also noticing that the lower-right lines alwys seem "open", not connected. (Drawing a standard rectangle with a line-width of 1px shows the "open" bottom corner.)
    Somewhere in code, there is an issue with drawing. Zoomed-out it is drawing "top-left" of pixel-locations, but zoomed-in, it is drawing from the "center" of the pixels. Thus, this akward offset, which is always top-left offset, and causing what seems to be "holes" on the bottom-right of intersections.
    (Might be a direct-x thing, becuse MS draws/calculates from top-left. GL draws from center. Most software draws bottom-right. Due to copyrighted "formulas" for drawing.)
    I suspect antialias may also be interfering with the drawings, as it completely messes-up curved-rectangles, making them look bowed-out not curved on the corners. Again, someone is using a GL formula for a MS translation, or software-formula for MS translation, not using the off-set adjustment to match the middle-draw to the top-left draw code.

  • Grid Snapping Isn't Working

    So I have Illustrator CC at work and for the life of me, I cant get grid snapping to work, I turn off all other snapping and guides and leave on only "Show Grid" and "Snap to Grid."
    Pleas help, this is exhausting, I can't precisely measure anything.

    Please tell us step by step what exactly you're doing, what exactly you expect and what exactly Illustrator is doing.
    Screenshots help.

  • Enhancement request: Grid snap without grid dots showing

    It would be helpful to turn on the grid snap without actually showing the grid dots, allowing diagram objects to align properly without the constant distraction of the dots. Thanks.

    created an ER for that
    Philip

  • Grid Snap in UIR Edit Window (Newbie)

    Sorry for such a seemingly dumb question... Experienced in LabView,
    learning CVI.
    I can't figure out how to turn off the "grid snap" in the UIR editor. When
    I move controls with the arrow keys, they jump about a quarter inch at a
    time. I'd like them to move in single pixel increments for fine alignment
    (the "Alignment..." options are not suitable for what I need to do). I've
    looked in the user manual and in the online help and either I can't read or
    it's not there.
    How do I turn off the grid snap in the UIR editor?
    Thanks in advance!
    Justin Goeres

    Dear Justin,
    In the UIR editor objects move ten pixels at a time if you select and move
    them by arrow keys.
    You can move one pixel at a time by using Shift + arrow keys.
    Regards
    Roberto

  • Custom Y-grids for multi-plot graphs

    How do I get the Y-axis gridlines to change for a given Y-axis (I have three)? As it is now, I have different scales for each Y-axis and the gridlines for all of them are displayed at the same time. This makes the graph very messy and it is difficult to discern which plot goes with which gridline.

    The way a multiplot graph is displaying scales is a bit curious.
    It's true a graph displys all scales at the same time, so if the various Y scales are different the display is confusing as you said.
    I suggest you some workarounds.
    First of all, arrange all Y axis in order to have the same or multiple scale so that all grid lines are equally spaced.
    Second, display the same lines for all Y scales (customizing the tabs as Alberto says).
    Third, display grid lines for different Y axes with different colors (maybe choosing pastel colors for grid lines and the same but bright color for plots).
    Fourth, hide all grid lines but one. It seems that this built-in option works in a curious way: if you have a black graph background you can see some pixels painted along X grid
    lines where Y grid should lie, and if you have another color background you can see the complete but 'hided' grid lines, as if they were painted in black instead of transparent. So I suggest you to use for grid lines the same color as graph background : that way the Y axis grid lines are effectively hided.
    Hope this helps
    Roberto
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to have a vertical grid lineon the waveform graph indicator for every 10% percent of the maximum X axis value?

    Hi,
    how to have a vertical grid line on the waveform graph indicator for every 10% percent of the maximum X axis value, so the x axis will split into 10, the vertical grids line in total will be 11 (including first and last)
    Example if the maximum X axis value is 11.56, first vertical grid is at the origin(0), second vertical grid is at 1.156 and continue to last one 11.56

    Thanks JohnM and Evan,
    the increment work great and i modify it to pass the 10% into "start" too, so it will start at the point of 10% of maximum range
    attached file to let people download in future, if they met the similar situation
    Attachments:
    10percent.vi ‏31 KB

  • Grid snap to

    Anyone know how if you can create a grid on a panel so that if the user clicks somewhere on it, and a drawing will appear there, that you can make it snap to the nearest gridline? The only snapTo I can find anything about is for sliders. Thanks

    All you need is a little math...
    int x = evt.getX(); // mouse click x
    int y = evt.getY();
    int gridx = 10; // spacing of grid lines
    int gridy = 10;
    int a = x / gridx;
    int b = y / gridy;
    if (x % gridx > gridx / 2) a++;
    if (y % gridy > gridy / 2) b++;
    x = a * gridx;
    y = b * gridy;

  • Guide and grid snapping going crazy - help!

    I'm having real problems when snapping bezier paths to guides and grids. As you can see in the video, it seems to snap to SOMETHING, but not the grid or guide, it's driving me crazy. Even more annoying, sometimes it works perfectly. Anyone know what the heck is going on? I have turned off the "new" snapping feature and just checked "snap to guides" in the VIEW menu.
    After Effects CC 2014 (latest)
    OSX 10.9.5
    Mac Pro 2013 (12 core)
    Please help, I'm on a huge project that is pure shape layers, and not being able to snap to guides is a nightmare.
    Thanks!
    Rory.

    Sorry, I cannot replicate your issue. I've tried having 8 shapes and masks and switching the pixel aspect ratio conversion on and off and switching the grid on and off and switching guides on and off and switching all of the snap functions in and out in various combinations.
    A very long time ago, when grids were new, I had changed the color of the grid to white. when I started working on a white layer later in the project I was freaked out that the grid had malfunctioned but it had simply been made invisible by the user. I spent hours on the After Effects AOL forum before I figured it out. This is not related to your problem, clearly, but these things are often less weird than they seem.

  • Is there a property to set the "Line Style" of the "X" & "Y" Grids of a Waveform Graph?

    I found the properties to change the colors, but not the "Line Styles". (I want to change them from solid to dashed lines).

    Sorry wd8ivl, I misread the query.
    You cannot change the xy gridlines to dash, only change the colour.
    Have a look at this post for some ideas.
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000097A90000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_TIER_0=0&USEARCHCONTEXT_TIER_S=0&USEARCHCONTEXT_QUESTION_0=grid+dashed&USEARCHCONTEXT_QUESTION_S=0

  • Need to help in alv grid graph

    Hi All,
       I made alv grid report.I put graph button in screen using pf status(&graph).
    Now when I execute the report output come and my graph button is also working fine.But when I click
    the graph button, the graph shows defalut column wise.Now I right click on graph and select chart type and then select LINES wise then graph shows LINES wise. Can we do default LINES wise so that
    when I click on graph button then it should come LINES wise default.
    Thanks,
    Rakesh

    HI,
    You can do this using the FM GFW_PRES_SHOW
    Check the sample program : DEMO_GFW_PRES_SHOW.
    For more infomation:
    refer to links:
    Re: How to plot graph in ALV?
    http://help.sap.com/saphelp_erp2005/helpdata/en/7e/daf830b46411d2961200a0c9308b1f/frameset.htm
    hope this infromation helps you.
    Thanks!

  • Grid lines appear in bold format in Graphs - OBIEE 10g

    Dear Experts,
    I am facing an issue with the grid lines in the graphs in reports.
    All the graphs in reports(webcat) are appearing with 'bold GRID lines' instead of normal grid lines which in turn is affecting the look and feel of the graphs in the webcat. Is there any way to eliminate this by setting any parameter in XML files?
    I am using OBIEE 10g version. Kindly let me know your inputs so as to eliminate this bold grid lines in all the graphs.
    Thanks,
    Sam.

    Hi,
    Refer this and it might be help you.
    Re: Remove grid lines by default in chart view
    Thanks,
    Satya

  • Control grid intensity graph

    Hi,
    I want to control the grid of an intensity graph to be exactly spaced by "1"... How to do?
    See attached example in LV8.5. Start with default values and you get grid lines with spacing of 1.
    Now change "size" to 15 and run again. Gridlines are now spaced by 0.5. Size=10 -> spacing of 0.2, size=4 -> spacing=0.1 ...
    I want to have a spacing of 1 regardless of size parameter! How to achieve this?
    Btw. I need both major and minor grid, as array size can grow to more than can be handled by major grid alone...
    Message Edited by GerdW on 02-26-2008 03:09 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    Test_Grid_LV85.vi ‏16 KB

    Hi Simon,
    thanks for clarification.
    To summarize: major increment has to be bigger than minor and you have to set them both...
    Scale labelling is not so important for me, but it would be nice to have each number when space is sufficient (in the example vi for sizes upto 15). It seems I have to change my graph formatting a little bit: make minor grid transparent when not needed (for small sizes) and switch gridlines on, when scale space is not sufficient to show all numbers...
    In the attached example pic (today's measurement of pressure sensor wafer ) I use the gridlines to separate single chips. And I always want to separate single chips regardless of array size (=wafer/chip) - which can vary from 10 to ~80...
    Message Edited by GerdW on 02-26-2008 05:26 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    grid-example.png ‏27 KB

  • Snap to Grid problem in Illustrator CS4

    I found a weird problem with the "snap to grid" feature in Illustrator CS4 running on MAC OS X Snow Leopard.
    To reproduce it, on my system, it is enough to:
    1. Make sure to have the Snap To Grid enabled (View->Snap to grid)
    2. Draw a rectangle (see BEGIN.JPG)
    3. Select the Direct Selection Tool
    4. Try to increase the width of the rectangle, by dragging one side of the shape (not a single point, but the whole side in a move).
    5. On my system, I see that Illustrator behaves in a wrong way; it is like Illustrator is snapping to a not aligned grid, and the rectangle begins to be distorted (see END.JPG).
    If I try to move a on point at a time, instead of moving one complete side, everything seems to works fine.

    Win Vista 64-bit AI CS4.  Can't seem to reproduce your issue.  I drag on the right side of a rectangle with grid snap on and show grid and it snaps exactly to the grid, not anywhere in between even if I start with a rectangle that was created "not-on-grid".  When it snaps it snaps to distances equal to the grid spacing, though it won't snap to the grid itself.  It's as if it snaps to its own internal grid.  I guess that's a problem in and of itself since once you have grid snapping turned on no matter where the original rectangle was you would like it to snap to the grid lines.
    EDIT:  Now I see how you created the problem--with direct selection (white arrow) as opposed to full selection with bounding box (black arrow).  Black arrow selection snaps to its internal grid while white arrow snaps to rhombus-like snapping.  I guess it's designed to be used with individual points and not with edges.  (AI doesn't have edge-snapping).

Maybe you are looking for