Note that there are some explanatory texts on larger screens.

plurals
  1. POFixing plot scale ratios of plots (and then unfixing them again)
    primarykey
    data
    text
    <p>I have used the function <em>daspect()</em> to make the Y and Z axes of a 3-dimensional plot appear with equivalent scale sizes in MATLAB.</p> <p>I acheived this using the following code (applied after plotting a figure with <em>plot3</em>):</p> <pre><code>tmpAspect=daspect(); % get the aspect ratio of the axes scales daspect(tmpAspect([1 2 2])); % make the Y and Z axes equal in scale </code></pre> <p>This is exactly the behaviour I am looking for, as I need the Y and Z axes to be the same when the figure is initially plotted.</p> <p>However - if I try to then zoom in, I am only able to zoom whilst maintaining the strict relationship between the Y and Z axes. This is of course exactly what I've asked the program to do, and it's doing its job very well. But I only want this relationship between the Y and Z axes to be applied at the time of generating the plot - after that, it needs to be possible to zoom in any way I like.</p> <p>Is there a way of setting a plot up with an equivalent scale (as in the code above), but allowing the user to then break this relationship if they want to?</p> <p>Edit: image below shows three views of my figure. First, in three dimensions, it can be seen that it's useful to maintain a strict relationship between the Y and Z axes (both are in degrees). Second, this is the view of the X and Y axes only. In order to see in more detail (3rd image), it's necessary to zoom in horizontally only. At this point, it's useful to remove the relationship between the Y and Z axes to facilitate better visualisation.</p> <p>n.b. The Y axis contains the 'X position' data and the Z axis contains 'Y position' data. Just to make things more confusing!</p> <p><img src="https://i.stack.imgur.com/gXoHm.jpg" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload