0

I am trying to plot some figures in a table like way.

so e.g. I have 3x4 grid of subplots (each one is a surf) and I want to have labels in the X and Y axis, something like:

    thingy1     thingy2     thingy3
a1   sp341       sp342        ...
a2     ...        ...         ...
a3     ...        ...         ...
a4     ...        ...         ...

where sp341 means subplot(3,4,1). To do this, I tried for thingyN using title and for aN using 'ylabel' (I view the surfs from z, so it works). This give me some nice results.

However, I also want axis off, so only the surface is seen! (what an annoying guy I am). As you may suspect, this also deletes the ylabels, with the axis.

Any way of workaround-ing this? I just need it for reporting purposes, so it doesnt need to be a general solution, an "ugly" way of solving it may work (as using ylabel is).

Ander Biguri
  • 35,140
  • 11
  • 74
  • 120
  • I think you can use `text`, if `axis off`. You are plotting them in at least one loop I suppose so can't you access the labels with your loop variables? – Rashid Nov 19 '14 at 17:44
  • mmm im not sure if I uderstood your suggestion @Kamtal. I can access the labels indeed, but for `text`, dont I need the location? how would I know the location of the text? – Ander Biguri Nov 19 '14 at 17:47
  • 1
    @Kamtal indeed that may be the answer. How woul I know wich X and Y to use? I could try doing it by hand until it fits, but it hurts me to do it :P – Ander Biguri Nov 19 '14 at 17:53

1 Answers1

2

The axis off command hides the labels, but does not delete them.
In order for them to appear you should do something like that:

h1 = ylabel('a1');
.
.
.
hN = ylabel('aN');
axis off
set(h1,'Visible','on')
.
.
.
set(hN,'Visible','on')
ThP
  • 2,312
  • 4
  • 19
  • 25