help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help - image representation not filling figure window


From: Pantxo
Subject: Re: help - image representation not filling figure window
Date: Tue, 5 Nov 2019 09:36:10 -0600 (CST)

Joe Tusek wrote
> Hi,
> 
> When plotting images using imshow, the resulting images resist expansion
> outside of their present boundaries under mouse control. Whilst in many
> cases it could be argued that the image does not warrant expansion,
> enabling it can reduce visual stress and is common when wanting to inspect
> pixels. Maybe there is already a plot option for this?
> 
> The following code generates the attached image,
> zzf_ed = eye(512,256);
> [H, theta, rho] = hough (zzf_ed, 'Theta', [-10:0.2:10]);
> imshow (mat2gray (H), [],"XData",theta,"YData",rho);
> axis on; xlabel("theta [degrees]"); ylabel("rho [pixels]");
> 
> There is a sequence of mouse and button operations that seem to do most of
> what I am after but are a very cumbersome way of achieving it. This
> involves using the Tools menu on the figure and enabling mouse zoom. This
> then enables me to expand the axes of the plot across the figure window
> and then by zooming in on the image I can achieve some improvement in
> zoom. It's not really giving the same outcome as just dragging the corners
> of the image to form a new plot boundary for the figure, which is what I
> was expecting to be able to do.
> 
> Also, a right-click figure copy function would be handy.
> 
> I am using W10 and Oct 5.1.0.
> 
> Regards
> Joe
> 
> Joe Tusek (BE MBA)
> Technical Director
> 23 Warabrook Boulevard, Warabrook, NSW 2304
> P +61 2 4961 9000  M +61 418 669 250
> 
> 
> 
> 
> imageplot_narrow.png (15K)
> <https://octave.1599824.n4.nabble.com/attachment/4694469/0/imageplot_narrow.png>

Hi,

Imshow is a high level convenience function that besides creating an image
object to display your data, sets up the axes to have the most commonly
expected properties including data aspect ratio [1 1 1] (see the "image"
option in the help string for "axis" function). If you want a better control
over how your image will be displayed, create a bare image object and set
axes properties directly:

zzf_ed = eye(512,256);
[H, theta, rho] = hough (zzf_ed, 'Theta', [-10:0.2:10]);
image (theta, rho, mat2gray (H), "cdatamapping", "scaled");
set (gca, "colormap", gray ())

HTH,

Pantxo



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]