Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I would like to generate set of four axis relating wavelength, wavenumber, energy and frequency in an arbitrary range. Like in this image but without the labels such as "RADAR".

example of ruler

The selection of the nice numbers could be done similar to plots with two x-axis with different units but without an ordinate "y axis".

range = {Quantity[0.1, "THz"], Quantity[10, "THz"]};
ticksmeV = FindDivisions[QuantityMagnitude@UnitConvert[Quantity["Planck's constant"] #, "meV"] & /@ range, 10]

{0, 5, 10, 15, 20, 25, 30, 35, 40, 45}

and so on. But I'm not clear how to put this in a graphic with correct scaling. What would be the best way to do this both in linear and logarithmic scaling?

Edit

Based in the answer by @ubpdqn I have done this:

rangeTHz = Quantity[{0.1,10}, "THz"];
rangemeV = UnitConvert[Quantity["Planck's constant"] #, "meV"] & /@ rangeTHz;
range\[Lambda] =  N@UnitConvert[Quantity["Speed of Light"]/#, "micrometer"] & /@ rangeTHz
rangeWn = N@UnitConvert[#/Quantity["Speed of Light"], "Wavenumbers"] & /@ rangeTHz
TableForm@Table[HorizontalGauge[Null, k, GaugeFrameStyle -> Transparent,  ScalePadding -> {0, 0}, ScaleDivisions -> 10, GaugeMarkers -> None, GaugeLabels -> Placed[QuantityUnit@First@k, Top], ImageSize -> 600, GaugeFaceStyle -> Transparent, LabelStyle -> 16,  AspectRatio -> 1/15], {k, {rangeTHz, rangemeV, range\[Lambda], 
rangeWn}}]

Mathematica graphics

but the problem is that the Wavelength scaling should be inverted. How can I fix that?

share|improve this question
1  
Never used it, but by reading the documentation maybe ScalingFunction->"Reverse" could do the trick? You'll have to dispose of Table and create the list manually, I guess. –  Peltio Jul 9 at 15:04
    
@Peltio, it seems that ScalingFunction->"Reverse" have no effect on HorizontalGauge. –  rhermans Jul 9 at 17:24

1 Answer 1

Perhaps HorizontalGauge. Obviously you can format and change from static to suit your needs:

HorizontalGauge[36, {0, 45}, GaugeFrameStyle -> Gray, 
 ScalePadding -> {.08, .1}, ScaleDivisions -> 10, 
 GaugeMarkers -> None, GaugeLabels -> Placed["meV", Above], 
 ImageSize -> 400, GaugeFaceStyle -> LightBlue, 
 GaugeFaceElementFunction -> "GlassRectangle", LabelStyle -> 16]

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.