You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some situations it is important that the distance for a given range in data is identical along the x and y axes (or z for 3D plots). In Matlab it is possible to use the "axis equal" constraint in such cases but I haven't yet been able to find equivalent functionality in Plotly.
I have been successful at getting the correct aspect ratio for the axes and ranges for the case depicted below left where (1) the plot width and height are identical, (2) the x-axis and y-axis ranges are identical, and (3) the plot legend is wholly within the axis boundaries. (The two magenta "measuring sticks" on the outer axis bounds have identical lengths in the plot.) An example of where I have failed, however, is the case below right where the plot is configured identically except that the legend now is to the right of the x-axis upper bound. Here what I would like to have happen is that the y-axis of the plot would shrink such that its upper bound (35) would move down to the position of the horizontal magenta line. In this way the data / axis aspect ratio would be identical to that of the x-axis. I know that this effect could be accomplished by reducing the plot height but I see no a priori way to know what value to use to preserve the data / aspect ratio given that I have no information on the width of the legend.
An additional example of where the axis equal option would be invaluable is where the 'heatmap' and 'contour' plot types are used to show map data that are plotted in UTM coordinates as illustrated below. In this case it is difficult to ensure that the x-axis and y-axis / data aspect ratios are identical due to the presence of the color bar.
The text was updated successfully, but these errors were encountered:
In some situations it is important that the distance for a given range in data is identical along the x and y axes (or z for 3D plots). In Matlab it is possible to use the "axis equal" constraint in such cases but I haven't yet been able to find equivalent functionality in Plotly.
I have been successful at getting the correct aspect ratio for the axes and ranges for the case depicted below left where (1) the plot width and height are identical, (2) the x-axis and y-axis ranges are identical, and (3) the plot legend is wholly within the axis boundaries. (The two magenta "measuring sticks" on the outer axis bounds have identical lengths in the plot.) An example of where I have failed, however, is the case below right where the plot is configured identically except that the legend now is to the right of the x-axis upper bound. Here what I would like to have happen is that the y-axis of the plot would shrink such that its upper bound (35) would move down to the position of the horizontal magenta line. In this way the data / axis aspect ratio would be identical to that of the x-axis. I know that this effect could be accomplished by reducing the plot height but I see no a priori way to know what value to use to preserve the data / aspect ratio given that I have no information on the width of the legend.
An additional example of where the axis equal option would be invaluable is where the 'heatmap' and 'contour' plot types are used to show map data that are plotted in UTM coordinates as illustrated below. In this case it is difficult to ensure that the x-axis and y-axis / data aspect ratios are identical due to the presence of the color bar.
The text was updated successfully, but these errors were encountered: