# Octave matrix to image pixels too small (do not have 1 pixel per integer)

I am working on a project which plots points over a checkerboard (representing seats for people). I would like each pixel in the image to represent each integer matrix entry. After updating my Octave from $3.8$ to $4.2$, any image takes up $\frac 14$ of the actual plot window using the default OpenGL/ FLTK, as seen below.

The sample code:

clear

A = [1,2;3,4];

image(A)

axis xy %orients to bottom left


I need the purple to take up the entire plot window.

I can plot overtop the image using the line() function and I get:

Now, if I enter graphics_toolkit("gnuplot") into the octave command window prior to running the code then I get the correct purple image taking up the entire plot window.

However, if I then use the line() function under gnuplot and plot the same line as before with

x=[0.5,2.5];
y=[1,1];
line(x,y,'color','red','linewidth',2)


the following bug appears:

multiplot> lot "-" binary format='%float64' record=2 using ($1):($2) axes x1y1 title "" with lines linestyle 10 ; ^ line 0: invalid command

and I get the following image:

Does anyone know the issue? Thank you.

• Could you provide a screenshot of what it looks like? – flawr May 5 '17 at 20:14
• @flawr The included image, the purple should take up the entire plot window – marmar44 May 9 '17 at 18:53
• I cannot reproduce your problem, when I try it the whole axis are filled. You can of course cut the axis using xlim([a,b]) and ylim([c,d]) or axis([a,b,c,d]). – flawr May 9 '17 at 19:09
• Cutting the axis works for cutting the axis, then the resulting image takes up a quarter of the new window. If I enter graphics_toolkit("gnuplot") I get the entire axes to be filled with the purple squares like I want. However, if I use the line( ) function to plot a line overtop I get the following error: lot "-" binary format='%float64' record=2 using ($1):($2) axes x1y1 title "" with lines linestyle 10 ; ^ line 0: invalid command – marmar44 May 19 '17 at 17:22
• If I don't use gnuplot, and instead use OpenGL (which is the default), I get the same quarter plot image of purple but plotting overtop works. – marmar44 May 19 '17 at 17:25