osiris81 Posted April 23, 2008 Report Share Posted April 23, 2008 Hello, I have a graph and need to change the x scale markers: On the x scale I show the "sample number" and the user can select which one he wants to see. So for example 1,2,50,80. So the xscale should be like: |.....|.....|.....| 1... 2....50...80 If I use the property to set the markers, I get something like: |..|...........................|..................| 1.2..........................50................80 Is there a possibility to set a marker for every value in the y-array? In the NI-forum I got the answer to use a picture control (draw a picture by myself with the right markers) but that's quite complicated, do you have another idea? Thanks, Rico Quote Link to comment
crelf Posted April 23, 2008 Report Share Posted April 23, 2008 QUOTE (osiris81 @ Apr 22 2008, 04:02 AM) Is there a possibility to set a marker for every value in the y-array? You set y-axis markers the same way you set x-axis markers. Can you show us the code you have? It's always eaiser to understantd your issue and make suggestions if we've got your code to work with. Quote Link to comment
osiris81 Posted April 23, 2008 Author Report Share Posted April 23, 2008 QUOTE (crelf @ Apr 22 2008, 11:50 AM) You set y-axis markers the same way you set x-axis markers. Can you show us the code you have? It's always eaiser to understantd your issue and make suggestions if we've got your code to work with. Hello, I made an example, it should show what I mean. The x-Scale should then be 0,1,2,0,1,2 (just in this example) and not 0,1,2,3,4,5,6,7,8,9. Cheers, Rico Quote Link to comment
MikaelH Posted April 23, 2008 Report Share Posted April 23, 2008 Here's a quick solution, that uses a picture control over a XY-graph. //Mikael Download File:post-941-1208869613.vi Quote Link to comment
crelf Posted April 23, 2008 Report Share Posted April 23, 2008 QUOTE (osiris81 @ Apr 22 2008, 08:37 AM) I made an example, it should show what I mean. Ahhh - I see what you mean. No, there is no way to do that with the native LabVIEW controls. Here's a couple of ideas (in no particular order): Use a picture control (like Mike's example above) - save that as an xcontrol so the xcontrol handles all of the custom work and your code only "sees" an indicator Mark points of interest using graph cursors - you can make their labels say whatever you like Quote Link to comment
Anders Björk Posted April 23, 2008 Report Share Posted April 23, 2008 If only labview would have had a vector for axis tick values and axis tick labels similar to Matlab. Possible the mathscript node has this builtin, simple plot is built in. Quote Link to comment
osiris81 Posted April 23, 2008 Author Report Share Posted April 23, 2008 Hello and thanks for the answers! This graph control is really not an easy solutions because I have to take care when the labels overlap and when the user zooms into the graph I have to recalculate everything. Has anyone already made all that work or do I really have to make it. Thanks anyway! Rico Quote Link to comment
LAVA 1.0 Content Posted April 23, 2008 Report Share Posted April 23, 2008 QUOTE (osiris81 @ Apr 22 2008, 09:43 AM) Hello and thanks for the answers!This graph control is really not an easy solutions because I have to take care when the labels overlap and when the user zooms into the graph I have to recalculate everything. Has anyone already made all that work or do I really have to make it. Thanks anyway! Rico The zooms are a "sticky-wicket"! I am afraid that short of embedding an Excel spreadsheet in an ActiveX container, you are probably going to have to enhance the examples you have seen. Now if you were to go ahaed and write this solution up and then post it back here, there will probably be someone else in the future that will get a more desirable reply when they ask the same question. Ben Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.