I think this is possible, but I don't see how to do it.
I'd like to specify different scaling for each of the x, y and z coordinates, and have this apply to everything that is plotted afterwards. For example, I might want to apply scaling of (1, 2, 3) to (x, y, z); then a line drawn from (0,0,0) to (1,1/2,1/3) would be rescaled so that it appeared to go the same distance in all three coordinates.
I see in the graph3.asy code things like
pic.scale.x.T(x);
which suggests this is being used, but I don't see where the scale is set.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the suggestion, but that rescales ticks in my graph axes too, so it doesn't look good.
Some background: I'm generating Asymptote code automatically, so I can rescale things before sending them to Asymptote. The problem then is with axes, which show rescaled numbers rather than
the original numbers.
So maybe my question should have been: How do I generate an axis with tick locations given in a real[] array, and the labels for those ticks given in a string[] array?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a partial answer to my revised question. I can create a function to rescale tick values before formatting them; this is sufficient for my needs.
Specifically: assuming the points are rescaled before Asymptote sees them, I can use code like
I think this is possible, but I don't see how to do it.
I'd like to specify different scaling for each of the x, y and z coordinates, and have this apply to everything that is plotted afterwards. For example, I might want to apply scaling of (1, 2, 3) to (x, y, z); then a line drawn from (0,0,0) to (1,1/2,1/3) would be rescaled so that it appeared to go the same distance in all three coordinates.
I see in the graph3.asy code things like
which suggests this is being used, but I don't see where the scale is set.
If you're willing to settle for scaling everything drawn so far rather than everything potted afterwards, you could use
Thanks for the suggestion, but that rescales ticks in my graph axes too, so it doesn't look good.
Some background: I'm generating Asymptote code automatically, so I can rescale things before sending them to Asymptote. The problem then is with axes, which show rescaled numbers rather than
the original numbers.
So maybe my question should have been: How do I generate an axis with tick locations given in a real[] array, and the labels for those ticks given in a string[] array?
I have a partial answer to my revised question. I can create a function to rescale tick values before formatting them; this is sufficient for my needs.
Specifically: assuming the points are rescaled before Asymptote sees them, I can use code like
and the ticks end up displayed on the original scale: -0.015, -0.01, -0.005, etc.