01-07-2011 12:23 PM
Hi,
I'm trying to get my spectrogram to display a logarithmic scale on the frequency axis, but whenever I go to the graph properties->y-axis, turn off autoscaling, check the log scale box, hit okay, and then run the vi, I still have a linear scale. I tried creating a property node for the spectrogram's y-axis and setting the scale to logarithmic, but this doesn't work either. Does anyone have any suggestions?
Thanks a lot,
Chris K.
01-07-2011 02:47 PM
bump
01-07-2011 10:46 PM
Your frequency axis is the X axis.
01-10-2011 12:33 PM
Thanks, but it looks to me like time is my x-axis, frequency is my y-axis, and the color scale is a third "axis," but I'm no expert.
01-10-2011 01:54 PM
Chris,
From the Help for an Intensity Graph: "The array indices are the X and Y values for a given Z." It is not at all obvious how taking the logarithm of the indices would be meaningful.
Lynn
01-10-2011 02:49 PM
I'm not sure how this addresses my question. A logarthmic scaling of my frequency axis should not be this complicated...
01-10-2011 03:42 PM
log (0), log (1), log (2), log(3), ... ?
The Intensity graph uses the array indices (0,1,2,3,...) for the axis, not the values of Y. If your frequencies are 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, ..., you would need an array with >=1001 elements to get the axis values where you wanted them and it would still plot the axis linearly. You can certainly put the Z-values for frequency 10 in the 4th column of the array. To get the labels to display the Y-axis frequencies might require overlaying an X-Y graph with logarithmic mapping of the Y-axis on the Intensity graph. By making the appropriate parts transparent, you should be able to get the Y-axis display you want. Tedious, but probably not too difficult.
Lynn
01-11-2011 02:50 PM
I dont want to actually take the logarithm of my frequencies. I want a logarithmic scaling of my frequency axis so that lower frequencies are more visible in the spectrogram than frequencies near the nyquist limit. Here are a couple examples of logarithmic scaling on the y-axis(notice that 1000 is not labeled as 3)
01-12-2011 07:56 AM
I think I understand what you want. Since the intensity graph only uses linear axes, you need to process the data externally before feeding it to the graph. That part is easy. Getting a log scale is the tricky part. I was suggesting two graphs: an intensity graph with the Y-axis scale invisible and an X-Y graph showing only the Y-axis scale in the log mapping mode to display the log Y-axis scale.
Lynn