Trying to identify this potentiometer marked "B5K"
If it's a "B" type, it should be linear.  From your plots, it's not very linear, but it's definitely not logarithmic either.

So it's a 5K linear potentiometer.  Given the tolerances, a 4.7K one would probably also work if you can't find 5K.

As per the comment by Hearth, if it's got 6 pins, it will be a dual-gang 5K pot.