Jump to content
Sign in to follow this  
Scatterplot

Programmatically create axes for X-Y Graph?

Recommended Posts

I'm wondering if it's possible to programmatically create a new axis in an XY graph. I know there are built-in tools to handle axis manipulation, but I can't find a way to generate a new axis at runtime, either through a right-click menu or a property node.

I do know about the Active Y Scale property, but for that to work the axis must already be present. I tried setting the Active Plot to "2" on a brand new plot, but it gave me an error. When I added more axes to the graph in edit mode, it would let me select "2" when I ran it- but it wouldn't -generate- the axis for me.

Please tell me there's a way to do this... I've been pulling my hair out over here!

Share this post


Link to post
Share on other sites

I'm wondering if it's possible to programmatically create a new axis in an XY graph. I know there are built-in tools to handle axis manipulation, but I can't find a way to generate a new axis at runtime, either through a right-click menu or a property node.

I do know about the Active Y Scale property, but for that to work the axis must already be present. I tried setting the Active Plot to "2" on a brand new plot, but it gave me an error. When I added more axes to the graph in edit mode, it would let me select "2" when I ran it- but it wouldn't -generate- the axis for me.

Please tell me there's a way to do this... I've been pulling my hair out over here!

I'm sorry, you can't create a new scale at runtime. The only work around is to create scales at edit time and then use the property "visible" to show hide each scale. I know it's less fun... but that's how it is.

The "active Y/X Scale" property lets you select the scale you want to operate on. If you have 3 X scales, set "Active X Scale" from 0 to 2 to operate on these.

post-7452-124867527331_thumb.png

Hope this helps

Share this post


Link to post
Share on other sites

I don't think it's exposed, even through scripting.

I think it is not even possible currently as the number of available scales seems to be a compile time thing. So no way you can do that on a running VI nor in a built application.

Rolf Kalbermatter

Share this post


Link to post
Share on other sites

Well I'd thought about using several axes made before compiling and using the visible property, as Antoine suggested, but you're right- it's a whole lot less sexy haha. Well thanks for the help guys- at least I got a good solid answer without going through any more work!

'Preciate the help guys.

Share this post


Link to post
Share on other sites

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.

Sign in to follow this  

×
×
  • Create New...

Important Information

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