Jump to content

Active plot order does not match actual plot order


Go to solution Solved by ensegre,

Recommended Posts

Hi guys,

 

I'm trying to programmatically update the names of five plots in a digital waveform graph. The plots are in a particular order which corresponds neatly withe the order in the legend as in the order under the "Plots" tab in the properties window.

However when I try to update the Plot.Name property for each plot by stepping through the ActPlot property the order seems to be 1-2-3-4-0, i.e. when I try to change the name of ActPlot=0 it affects the last plot instead of the first.

What gives? Is there any other indexing property instead of ActPlot I can use which LabVIEW uses to keep track of the plot order? I'm just updating an old vi so it would be nice if it could be solved without altering the waveform used as an input to the graph.

Link to post
Share on other sites

This is simply amazing! Speedy answer, working solution. Thanks enserge!

 

To be clear for anyone with the same problem it is the two steps YScale.ScaleFit=0 and YScale.ScaleFit=2 that does the trick (I guess you force LabVIEW to internally update the chart or something). Will you report this to NI enserge?

Edited by codcoder
Link to post
Share on other sites

go ahead, please, I'm kinda busy these days. I sort of remember I have read on some other thread that the digital graph was a nest of bugs, but if we don't report them one by one there is little chance to get them worked. I also had some occasional mess ups of the plotted part, but not that systematically to pinpoint when, and likely the trick of forcing re-autoscale masks them.

Link to post
Share on other sites

In my experience, if you post bug reports at http://forums.ni.com/ you'll catch the attention of NI staff and there's a good chance they'll open a CAR (especially since you have instructions and workarounds).

 

Also instructions on how to reproduce.  If they can't do that first you won't get far.

  • Like 1
Link to post
Share on other sites

The attached shows what I think is the bug for me. And another one btw related to the always visible plot legend in either classic or tree form. And third, occasionally the Y scale gets wrong but it is not clear to me when.

I suspect race conditions while redrawing as I've been able to reproduce the faulty naming only using the event structure; labelling was always correct if I omitted the outer while and event frame, i.e. if I had run the inner code once and again from ready to run VI state.

DigitalPlotNames.vi

 

ETA: tried twice to submit it as a service request and got

An error ocurred.
We are unable to create your Service Request at this time. Please try again later.
Edited by ensegre
Link to post
Share on other sites

ETA: tried twice to submit it as a service request and got

An error ocurred.
We are unable to create your Service Request at this time. Please try again later.

 

You'll have much better luck posting to http://forums.ni.com/ than submitting a service request.

 

(Twice before, I tried to submit bug reports using service requests. The staff who was assigned to me started off by asking very simple questions which were already answered in my original post. Since then, I've posted all my reports to the forum, and get good outcomes)

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.

  • Similar Content

    • By torekp
      Here is a graph I made recently, which shows particle number (symbol), material (broad color family), measurement location (exact color), amplitude (X axis) and phase (Y axis).  That's five dimensions in a 2D graph!  There are some obvious limitations.  For instance, there are only 16 symbols, so whatever you're representing by choice of symbol better not have more than 16 categories.  And there are only so many colors, especially if you want them all to be ordered in a spectrum from red to violet.  It gets worse when you try to have "broad color family" like I do here with reddish colors for aluminum and bluish for titanium, because the obvious logical thing to do is to skip over some shades in between the families, reducing the total number of available colors.

      What other options should I consider?  How do you do it?  I don't usually use 3D graphs because (a) they're harder to work with and (b) when I create a report for management, they like to have 2D images they can print out, or view without needing Labview on their computer.
      I'm attaching two VIs I use to create color spectra for my graphs.  I use colors_darken_lighten to darken plots for a white background.  To skip over colors, I obtained 6 colors in my spectrum and reshaped the array to two-by-three, then indexed by measurement location to get the first two colors from each broad color family.
       
      colors_darken_lighten.vi
      plot_color_spectrum.vi
    • By Mike King
      Hi, I figured people here may be more interested in this project. 
       
      I have some cool graph extensions I'm building in an open source project, which make some nice graphical overlays for XY graphs and waveform graphs in LabVIEW.  I've got a github page where you can grab the code, support the project or just have a look at some of the same screenshots.
       
      Everything updates live in the graph, so you really need to see it, to get how it all works, so here you go:
      https://github.com/unipsycho/Graph-Extensions-LabVIEW
       
      Please star follow the project if you want to see this developed and I'd appreciate any feedback or ideas to extend it further.  The markers are very much IN development right now, so no where near finished, but the tools can still be seen working.  THANKS!
       


       

    • By ijustlovemath
      I just recently had a need for XY chart functionality in my application. The example NI has on its website was a little too simple, as I needed support for multiple curves. I've attached the VI and some examples, would love to hear any critiques you have.
       
       
      XYChart.zip
    • By Manudelavega
      Hi,
       
      My graph is a XY Graph but the X-scale is just the time. I use the XY Graph in order to define the time stamp of each sample. I use cursors that I snap to the plots in order to display the plots' names. Everything works well when all the plots are displayed against Y-scale 0. But when switching a plot to Y-scale 1, the associated cursor keeps moving like if its plot was still on Y-scale 0. Simply dragging the cursor with the mouse a little bit snaps it to its plot properly (value displayed against Y-scale 1).
       
      I tried using the Cursor.YScale property of the cursor but it doesn't seem to help.
       
      Has any of you encounter this issue?
       
      I am using LV 2011.
       
      Thanks!
    • By nikp
      Hello,
       
      In matlab the plot data can be save as a *.png,*.jpeg, and so on and even a pretty good option *.fig. Later when the *.fig is opened you have the real plot as before and this can be edited like changing the legeng , x and y labels, color of the plot etc,.
       
      Is there any option like this in labVIEW. I  have seen options like saving the data into excel and to different image formats. Is there any special tool kit or add in functions??
×
×
  • Create New...

Important Information

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