# Feature Request: Transform TAxes

**URL:** <https://root-forum.cern.ch/t/feature-request-transform-taxes/16327>\
**Category:** ROOT\
**Created:** [July 3, 2013, 9:55pm UTC](https://root-forum.cern.ch/t/feature-request-transform-taxes/16327 "2013-07-03T21:55:13Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![jfcaron](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/7c8e57/32.png) [@jfcaron](https://root-forum.cern.ch/u/jfcaron)\
**Post date:** [July 3, 2013, 9:55pm UTC](https://root-forum.cern.ch/t/feature-request-transform-taxes/16327/1 "2013-07-03T21:55:13Z")

</div>

It has come up many times now for myself and others (and you can see by searching RootTalk) that we need to “rescale” an axis somehow. I don’t mean to change the actual values underneath, but somehow transform the labels which appear on the axis.

It would be very convenient if there was a way to do the following:

1. define either a C++ function or a TF1 which takes as the argument the original axis values and returns the transformed valued
2. pass this function/functor/thing to a TAxis method
3. magically see the axis labels transformed when the gPad is updated.

This would allow users to for example change the units on their TGraphs and TH\* without actually changing the underlying object. It would allow remapping to arbitrary non-linear axes. It looks like there is such a method for TGaxes but it is absolutely not clear how to use this for the axis of an existing object (which is a TAxis, not a TGaxes, and they seem to be only distantly related classes).

If this would somehow break the TAxis implementation, I could request a much more modest feature. A TAxis method taking two arguments: a shift and a scale factor. Then one could apply arbitrary affine transformations to their axes (allowing most unit transformations) again without changing the underlying data.

If there is currently a way to accomplish this, I would be very happy to learn of it. I hope I don’t just get reasons why this is impossible.

Jean-François

---

_[View the full topic](https://root-forum.cern.ch/t/feature-request-transform-taxes/16327)._
