convert makeplot to use case data