Changing Gizmo axis from linear to log
aladagostin
Hi,
I would like to change my surface plot x axis mode from linear to log. I know that's easy on 1D plots, but multidimensional ones I don't know if it is possible.
Any tips are welcome!
Gizmo does not support log axes because it does not make sense for all the objects that it can draw. You should be able to accomplish the equivalent by plotting data that is transformed in the relevant direction. For example, suppose you are plotting a surface from a matrix of z-values and you want the z-axis only to be in log scale. You can then execute:
MatrixOP/O scaledData=log(srcMatZ)
with obvious equivalents for log2() and ln().
December 20, 2021 at 09:35 am - Permalink
AG has shown how to easily transform your surface data so it appears as a logarithmic display. However if you want z-axis ticks and labels, they will be based on the transformed logarithmic values, which may be of limited use. One possible work-around is to create a pseudo-axis with a vertical linear Path object, with non-uniformly spaced points corresponding to the "nice" numerical values usually seen on log axes, e.g. 2,3,4,.. representing values in the 1-to-10 decade for example. Then use lateral line markers for the tick marks at the path points. There are several demo experiments representing similar scatter arrows techniques to get you started.
December 21, 2021 at 03:35 am - Permalink
Another way of creating your own axis scaling is to use any of the built-in axes and provide a pair of waves containing the values at which tickmarks are drawn and the matching text labels, e.g.,
ModifyGizmo ModifyObject=axes0,objectType=Axes,property={ 0,tickLevelWave,numericLevelWave}
ModifyGizmo ModifyObject=axes0,objectType=Axes,property={ 0,tickLabelWave,textLabelWave}
Note that you can make this assignment right from the axes properties dialog, Ticks and Labels tab choosing User Waves under Position and Size.
December 21, 2021 at 08:11 am - Permalink