I am using a tonemapper in our project and a friend of mine asked if I could provide him with a plot of the tonemapper used (different functions are implemented). I tried in MATLAB to copy the tone-mapper function and use luma values from -5 to 5.0 to feed to the function, but the resulting plot is nothing like a classic tonemap function plot as I happen to see around. The function is totally correct, but am I missing something stupid that must be taken into account when trying to plot them?
Luma values should always be positive. You might be confusing it with log-luminance. A lot of these plots are shown with a log scale for the x axis. On a log scale you can see the characteristic "S curve", while on a scale whose x axis is linear luminance, it doesn't look like an S.
For example, my favorite tone curve is Jim Hejl's curve as reported by John Hable, used in Infamous Second Son and probably other games. Here's what the curve looks like in linear space (i.e. just graphing the equation on that slide):
Here's what it looks like if I convert the x-axis to a log scale (in other words, replace x by 2^x in the equation, so that x is now the log2 of luminance):
Now that looks more like the S-curve that I guess you were probably looking for. Here are the equations on Desmos if you want to play around with them.