Jump to content

Text labels on x axis of plot?


MartinMcD

Recommended Posts

Hello everyone,

I'm trying to think of a way of replacing the numerical values on the x axis of my plot below with text.

The graph can be resized by the user and the number of bars changes as well. I've thought of an array of fill slides instead of a plot but they don't resize as nicely.

My preferred option at the moment is an array of strings which I position under the x axis of the plot. This would work if there was a way of resizing the element width at runtime.

Does anyone know of a way of tackling this please? I'll keep searching and post back if I figure it out.

Thank you,

Martin

Perhaps I could use VI Scripting to the create/destroy the number of string controls that I need and then position the controls based on the width of the plot and the number of bars shown. I'm yet to try VI Scripting though...

post-13935-0-87782900-1295690506_thumb.p

Link to comment

It is a bit inelegant but I have come up with a solution. I create 10 string controls (more than I think I'll need) and get references to them. I then position each of the ones I need based on the range of the x axis and then hide the ones I don't want. A bit messy but it works fine.

Link to comment

It is a bit inelegant but I have come up with a solution. I create 10 string controls (more than I think I'll need) and get references to them. I then position each of the ones I need based on the range of the x axis and then hide the ones I don't want. A bit messy but it works fine.

You could draw your own axis using the 2D picture plot functions (2D picture plot). The downside is you don't get all the zoom candy etc.

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
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.