Does TensorBoard TensorFlow have the features to add labels for axes and legends on plots? If so, how?
ML System Design practice on Codemia
Design recommenders, ranking systems and training pipelines the way ML interviews actually ask for them, with worked solutions.
Introduction
TensorBoard can label runs and metric series through the data you log, but it is not a full plotting library like Matplotlib where you freely set axis titles, legends, and arbitrary chart decorations on built-in scalar charts. In practice, TensorBoard's default dashboards have limited plot customization, so the answer is partly yes for series naming and grouping, but mostly no for free-form axis and legend editing.
What TensorBoard Gives You By Default
TensorBoard's scalar dashboard is driven by what you log. If you write a scalar called loss, TensorBoard uses that tag name in the UI. If you compare multiple runs, the run names appear as the series labels.
Example logging code:
In TensorBoard, the chart titles and series identifiers come from:
- the summary tag such as
training/loss - the run directory such as
run_1
So you do get labels, but they come from the metadata of the logged summaries, not from a separate chart-formatting API.
Axis Labels Are Mostly Fixed In Built-In Plots
For the standard scalar dashboard, TensorBoard controls the axes itself. The horizontal axis is typically the training step, wall time, or relative time depending on the UI selection. The vertical axis reflects the scalar values.
What you cannot usually do on the built-in scalar plots is say:
- label the x-axis as
epoch number - label the y-axis as
cross entropy loss - add a custom legend title
- manually position annotations the way you would in Matplotlib
That kind of full chart customization is outside the normal built-in TensorBoard scalar feature set.
Use Metric Names And Run Names As Practical Labels
The most effective way to make TensorBoard charts readable is to log clean names.
Good example:
This produces a useful combination:
- run label:
adam_lr_1e3 - chart tag:
validation/f1_score
That is often the closest equivalent to choosing legend labels in ordinary plotting libraries.
If your run names and metric tags are descriptive, TensorBoard becomes much easier to interpret even without arbitrary axis-title editing.
Custom Scalars Can Improve Grouping, Not Full Styling
TensorBoard's custom scalars plugin can group existing scalar summaries into dashboards, which helps organization, but it still does not turn TensorBoard into a general-purpose plot styling tool.
Example:
This can help organize views, but it still does not give you arbitrary axis-title APIs like plt.xlabel() and plt.ylabel().
If You Need Full Labels, Log A Plot Image
When you need full control, the usual workaround is to create a Matplotlib or Plotly figure with custom labels and then log it as an image to TensorBoard.
This does not create an interactive scalar chart, but it does let you display fully labeled figures inside TensorBoard.
When You Need More Than TensorBoard Offers
TensorBoard is excellent for experiment tracking, metric comparison, embeddings, and graph inspection. It is not designed to replace a full scientific plotting environment.
If the main requirement is presentation-quality plotting with custom legends, annotations, and axes, a better workflow is often:
- use TensorBoard for experiment monitoring
- export or collect the metric values
- make final charts in Matplotlib, Seaborn, or Plotly
That division of labor keeps TensorBoard doing what it is best at.
Common Pitfalls
The biggest mistake is expecting the scalar plugin to expose a full plotting API. TensorBoard reads logged summaries; it is not a drop-in replacement for Matplotlib.
Another mistake is using unclear tag names such as metric1 or value. Because tag names become the visible labels, poor naming makes the charts harder to read.
People also confuse the presence of run labels with customizable legend controls. TensorBoard does show series identities, but the legend behavior is much more constrained than in dedicated plotting libraries.
Finally, if you need polished figures, do not fight the tool. Log a pre-rendered image or use a separate plotting stack for final presentation.
Summary
- TensorBoard can show meaningful series labels through run names and summary tags.
- Built-in scalar charts do not offer free-form axis-title and legend customization like Matplotlib.
- Custom Scalars can improve grouping, but not full chart styling.
- For full control over labels and legends, generate a plot externally and log it as an image.
- Treat TensorBoard as an experiment-monitoring tool first, not a general-purpose plotting library.
Related reading
- Does TensorFlow 1.9 support Python 3.7
- Does TensorFlow by default use all available GPUs in the machine?
- Does TensorFlow have cross validation implemented?
- Does TensorFlow job use multiple cores by default?
- Does the dataset size influence a machine learning algorithm?
- Download link for Ta Feng Grocery dataset
- Does tensorflow map_fn support taking more than one tensor?
- Does Tensorflow normalize input data by default?
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseNo course covers this one yet
Basis Lab writes one for you from a sentence about what you want to be able to do, then teaches it and checks you understood. Your first course is free.
Build my courseML System Design practice on Codemia
Design recommenders, ranking systems and training pipelines the way ML interviews actually ask for them, with worked solutions.