Draw histogram with special case

f I have two files.txt (attached), each file has two columns