From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph and map mode

Hello,

 

  I am using a XY graph and using the map mode for the Y axis to change the Yaxis to a logarithmic mode. The min and max values of the y axis are set to -50 and -7. The y axis of the XY graph is display as 0.01 (min) 10 max. Why doesn't the XY graph accpet the main and max limits that I sent to it?

 

Regards,


Kaspar
0 Kudos
Message 1 of 7
(2,706 Views)

What is the logarithm of a negative number?

 

You can certainly set the mapping mode to be logarithmic. I have a progam running right now which does it.  But if you try to force a negative value for the scale while it is in log mode, it will not resond.

 

Lynn

0 Kudos
Message 2 of 7
(2,701 Views)

Hello,

 

   I need to have the Y axis in log mode with negative numbers because I am trying to duplicate a screenshot of a spectrum analyzer that is taking measurements that range from -7 to -20.

 

Regards,


Kaspar
0 Kudos
Message 3 of 7
(2,687 Views)

Are those values in decibels?

 

Lynn

0 Kudos
Message 4 of 7
(2,683 Views)

Hello,

 

  Yes the values are are in dbm, but as far as Labview graph go, the units hould be irelevant. I am trying to duplicate the screen on a HP8562E spectruum analyzer that alsway has a 10 by 10 grid to display waveforms.

Regards,


Kaspar
0 Kudos
Message 5 of 7
(2,677 Views)

It can be done, bu it may not be trivial, depending on how automated you want it to be.

 

First, create a duplicate scale.  See the LV Help page titled Adding Multiple X- and Y-Scales on Graphs or Charts.

 

Next, calculate the values in dBm from the range in the data or the range of the instrument.

 

Use property nodes to set the properties of one scale to display the dBm values and hide the other scale.

 

Here is a little example which shows what I tried.  Some of the things in there may not be needed.  This is not optimized.

 

scale in dB.png

 

Lynn

0 Kudos
Message 6 of 7
(2,668 Views)

@Kaspar wrote:

Hello,

 

  Yes the values are are in dbm, but as far as Labview graph go, the units hould be irelevant. I am trying to duplicate the screen on a HP8562E spectruum analyzer that alsway has a 10 by 10 grid to display waveforms.


If you're just trying to make it match the screen you could"

1) negate the vale and then

2) make the axis go from big to small rather than small to big,

 

so as Y increased (which would be increasing -ve in the actual value) to would move down the y axis. (then just make sure the axis is labelled (-ve) or something.

0 Kudos
Message 7 of 7
(2,658 Views)