I also notice that if i start from original position and rotate to each of xy, yz and xz view that something interesting happens. for the other two (yz and xz) if i rotate to position and then click "view" nothing happens - but with 'xy view' when i rotate to that position and then click it, the figure zooms in a fraction - this is probably where that z offset is arising - how do i fix that?
Linkprop breaks down with "go to xy view"
2 次查看(过去 30 天)
显示 更早的评论
So i have two axes which i am using to display a modified colorbar for my figure (essentially i have painted one color as a 'faux' color where there is no data and don't want that on the colorbar. i used 'linkprop' to link the axes and all is well - except if i press the "goto x-y view" option in the right mouse click of the rotate button. Then the axes are offset.
my linkprop line is:
linkprop([handles.axes1,handles.axes2],{'Position','CameraPosition','CameraUpVector','Position','PlotBoxAspectRatio'})
but i get the following if i print out the 'axes' after "goto xy view"
Axes with properties:
XLim: [-0.1000 0.1000]
YLim: [-0.1500 0.2000]
XScale: 'linear'
YScale: 'linear'
GridLineStyle: '-'
Position: [0.0397 0.1009 0.5080 0.7301]
Units: 'normalized'
Show all properties
ans =
Axes with properties:
XLim: [0 1]
YLim: [0 1]
XScale: 'linear'
YScale: 'linear'
GridLineStyle: '-'
Position: [0.0397 0.1009 0.4857 0.7301]
Units: 'normalized'
so clearly position is not 100% linked here.. any suggestions?
4 个评论
Jan
2017-8-3
编辑:Jan
2017-8-3
@Jason: Do you know the "{} Code" button to format code? This will look nicer than inserting a blank line after each line.
Yes, now I see it in R2016b.
I would prefer a cheap solution: Use one colormap in a single axes object, and draw another colorbar, in case of troubles manually. Look in the code of colorbar.m to see, how this works. It is not worth to struggle with two axes and linked properties.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!