Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are a few ways to conceal the plot axis while still displaying the labels, depending on the software or tool being used. Here are some examples:

  1. In MATLAB, you can remove the axis lines and ticks using the following commands:
axis off % to turn off the axis lines and ticks
xlabel('X Label') % to display the X label
ylabel('Y Label') % to display the Y label
  1. In Python's Matplotlib library, you can create a plot without axis lines using the following code:
import matplotlib.pyplot as plt

fig, ax = plt.subplots()
ax.spines['right'].set_visible(False) # hide the right axis
ax.spines['top'].set_visible(False) # hide the top axis
ax.set_xlabel('X Label') # display the X label
ax.set_ylabel('Y Label') # display the Y label
  1. In Excel, you can hide the axis lines by selecting them and pressing the delete key, then display the labels using the following steps:
  • Select the axis labels and right-click to open the Format Axis dialog box.
  • In the Axis Options tab, under Label Position, choose the position where you want the labels to appear (e.g., High, Low, or None).
  • Select the label font and size under the Font tab, and click OK.