Scaling waves for long ranges on log axis plots

I have just run in to a case where some clever trick may be needed.

I am trying to generate a theoretical curve that extends over nine orders of magnitude in x. Features of interest appear at 10^9, 10^13, and 10^16 in the scale. Using linear scales on the data waves, I loose resolution on features at the low end. I suspect that I have one of two options:

* Create an explicit x wave that is scaled logarithmically.
* Increase the number of data points in my scaled wave to recover the resolution at the lowest end.

Independently, I might wish for a new built-in feature to SetScale that would scale the x by logarithmic steps increments. Perhaps the x-scaling could even be designated by a function call (much as the TransformAxis package creates a new scaling axis).

SetScale/F=ScaleFunction x, ...

Function ScaleFunction(p) : SetScale Function
     variable p

     return log(p)
end


Is this idea worth any thought?
Maybe you could remodel your function/wave to do the exponential/logarithmic part inside and use a linear x-scale (and of course adjust the label accordingly). As a drawback, the automatic tick features will probably fail, to my experience.

I'd support the request for log wave scaling. However, I'm aware that this will cause a lot of trouble 'below the surface'.

HJ
In the meantime, I do an equivalent to below for the three functions.


Function calc_epdipole(ep0, tau, xx)
	variable ep0, tau, xx

	variable rtnv
	
	rtnv = ep0/((xx^2*tau^2) + 1)
	
	return rtnv
end


Function Update_Waves()

	wave xe, eprd
	
	variable ep0, tau, dep
	
	variable ynD

	// molecular (dipolar)
	ControlInfo/W=Inputs check_d
	ynD = v_value
	ControlInfo/W=Inputs slider_ep0
	ep0 = v_value
	ControlInfo/W=Inputs slider_tau
	tau = 10^(v_value)
	
	eprd = ynD*calc_epdipole(ep0, tau, xe[p])

...
end


The graph shows eprd vs xe (and others). I generated xe as
xe = 10^(8 + p*(2e-4))
over 45001 points.



The inherent ability to set the scale on waves by a function would be cool.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
polarizationplot.png (204.94 KB)