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:


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


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:

OpenGL with Line plotted overtop

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


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:

Gnuplot with Line() function overtop

Does anyone know the issue? Thank you.

  • $\begingroup$ Could you provide a screenshot of what it looks like? $\endgroup$
    – flawr
    May 5, 2017 at 20:14
  • $\begingroup$ @flawr The included image, the purple should take up the entire plot window $\endgroup$
    – marmar44
    May 9, 2017 at 18:53
  • $\begingroup$ 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]). $\endgroup$
    – flawr
    May 9, 2017 at 19:09
  • $\begingroup$ 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 $\endgroup$
    – marmar44
    May 19, 2017 at 17:22
  • $\begingroup$ 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. $\endgroup$
    – marmar44
    May 19, 2017 at 17:25


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.