Jump to content

change markers on xscale


Recommended Posts

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

Link to comment

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.

Link to comment

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

Link to comment

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

Link to comment

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

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.