LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

too many digits in log scale

Solved!
Go to solution

I thought I had reported it before - but couldn't find the post nor a known issue...

 

I have a XY graph with plotted waveforms. All fine. Then I change the Y scale from lin to log and the mess happens, see below.

 

The left image shows the graph border with a linear Y scale, the right image after changing programmatically to log scale

 

lin.pnglog.png

0 Kudos
Message 1 of 9
(6,184 Views)

The list of strage things you're finding in CVI2013 is growing more and more... Smiley Wink

Can this one be fixed by calling SetCtrlAttribute (..., ..., ATTR_YPRECISION, 0); after setting the map mode to VAL_LOG ?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 9
(6,173 Views)

I wouldn't necessarily blame 2013 for this, graph issues did exist before Smiley Wink

 

I will try your suggestion and report back - but I doubt it's relevant for another issue: did you realize that there are two identical labels of '0'?

 

My problem is more that NI will request a demo project - and this can take some time, my time...

 

The reason is that this effect does depend on the axis range, it does not always show up...

0 Kudos
Message 3 of 9
(6,167 Views)

Yes, I had seen the two '0' labels and this fact puzzled me a bit. I supposed that having a fixed scale precision the label generation would be more correct.

It's more or less a blind shot, but it may worth trying it.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 9
(6,160 Views)

OK,

 

I was playing more and can add some details, hopefully sufficient to reproduce the issue:

 

Plotted is a Gaussian with the parameters 1.0, 3.0e-3, 2.0e-5. For these values changing map mode to log scale works correctly. Now, if I replot the waveform with changed parameters (0.999, 3.0e-3, 2.0e-5), i.e. a slightly reduced amplitude, log scale goes wrong.

 

Adding the attribute of 0 precision as kindly suggested by Roberto helps to remove the many digits, but it does not help with respect to the number of labels and the issue of identical labels (see the second graph below).

 

In a next step I replotted the graph, now with the original parameters, but the log scale does not revert to the correct scaling, although formally the identical function is plotted.

 

 

If I change the amplitude parameter of my Gaussian function to 10.0 I get a different scaling, but overall it is not much better: Somehow, some decades are omitted, there is no major tick for 100000, 10000, 1000, 100, 10 - only the 1 and two times a mysterious 0. (third graph below) 

 

gauss_ok.pnggauss.pnggauss_wrong_II.png

0 Kudos
Message 5 of 9
(6,150 Views)

I am sooo nice Smiley Tongue

 

Attached is a demo showing the bug

0 Kudos
Message 6 of 9
(6,120 Views)

Smiley Frustrated... I don't know what to say... Smiley Frustrated

 

I would like to have this fixed (soon), but NI does not even want to take note...

 

hello...., is there anybody out there?

Message 7 of 9
(6,073 Views)
Solution
Accepted by topic author Wolfgang

Hello Wolfgang,

 

First of all, thank you for providing this demonstration, and as always, thank you for your valued feedback.  I have created a bug report (ID: 438812) to track this issue.  

 

Thank you,

Daniel

Daniel Dorroh
National Instruments
0 Kudos
Message 8 of 9
(6,042 Views)

This issue also has been solved (in CVI2013 SP1) Smiley Happy

0 Kudos
Message 9 of 9
(4,887 Views)