replacement for plotcat.py