Is a logarithmic X axis scale for frequency responses possible?

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by TAJ on 27th March 2013
I would like to use RGraph to build a little audio related app that needs an output graph. I was trying to determine if there is an attribute to set the x-axis to use a logarithmic scale as in a frequency response graph, but I could see anything in the documentation. Or perhaps there is some other way to tackle the problem?

On this random web page I found, there is an example of what I would try to produce:

Is that possible with RGraph?
Posted by RGraph support on 28th March 2013
Hi there,

I think it should be possible. You just need to set the chart.xmax to say 5 and then you can control the labels that are displayed with chart.labels. Though you may need to use the drawing API X axis object for the X axis. Eg:

Richard, RGraph Support
Posted by Enter your name... on 28th March 2013
Okay thanks, I played with that for a bit and I could make it work to a degree, but the tick marks and grid lines and so forth looked like they'd be a lot of work to force to cooperate in that approach.

What I was hoping for, and you could take this as a feature request, was what I had used previously in the Flex chart library. There was a property you could set that controlled the numerical scale of each axis and it applied to the labels, the gridlines, the tick marks, etc.

Here's maybe a better visual example of what I'm trying to do. linear y scale, log x scale:

Posted by RGraph support on 29th March 2013
Hi there,

The grid doesn't do anything like that. To acheive it it would not be insignificant - you'd have to turn off the grid entirely and do it yourself. Though that in itself would not be simple as there's no "ongrid" event.

Richard, RGraph Support

Add a reply

« Back to message list