How to use categorical color schemes in Plot?

The documentation page for Plot mentions you can have color schemes:

  color: {
    scheme: "category10"
  marks: [, {x: "x", y: "y", stroke: "cat"}),

cat will be numbers ranging from 1 to 10, this seems to disable the categorical color schemes. I get Error: unknown scheme: category10. Is it possible to treat those 10 values as categories instead of as ordinal?

You can set the scale type to be categorical:

color: {
  type: 'categorical',
  scheme: 'category10'