> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# What if I want to log some metrics on batches and some metrics only on epochs?

To log specific metrics in each batch and standardize plots, log the desired x-axis values alongside the metrics. In the custom plots, click **Edit** and select a custom x-axis.

```python theme={null}
import wandb

with wandb.init() as run:
    run.log({"batch": batch_idx, "loss": 0.3})
    run.log({"epoch": epoch, "val_acc": 0.94})
```

***

<Badge stroke shape="pill" color="orange" size="md">[Experiments](/support/models/tags/experiments)</Badge><Badge stroke shape="pill" color="orange" size="md">[Metrics](/support/models/tags/metrics)</Badge>
