Moving the cross point of vertical and horizontal axes to (0,0)
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
Hello,
Does any body know that in plotting figures, how I can move the cross point of vertical and horizontal axes to (0,0)? I have figures and the horizontal and vertical axes always cross in the lowest left of the figures. How to move this point to (0,0)?
Regards,
Kourosh
0 comentarios
Respuestas (2)
  dpb
      
      
 el 2 de Jul. de 2016
        If have recent version there's now a 'center' value on the position properties. If using earlier release, just answered a short time ago-- <how-to-shift-xaxis-location-to-origin-0>
It only does the one axis, but the pattern to follow for the other should be obvious...
3 comentarios
  dpb
      
      
 el 17 de Jul. de 2016
				If you move both x- and y-, I'd overlooked you'll need four axes, not just two to cover the ranges (one for each quadrant). At that point it's probably better to either upgrade or use IA's solution of drawing the axes manually instead.
  Image Analyst
      
      
 el 2 de Jul. de 2016
        I don't know how. But it's easy to draw lines there.
line(xlim, [0,0], 'LineWidth', 2, 'Color', 'k');
line([0,0], ylim, 'LineWidth', 2, 'Color', 'k');
Removing tick marks and labels and moving them to those new axes you just drew would be more complicated. Perhaps just having the thick lines for the axes would be good enough.
You might see if there is a File Exchange entry for it: http://www.mathworks.com/matlabcentral/fileexchange/?search_submit=fileexchange&query=axes&term=axes
0 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



