Fix to read histogram type PDFs from the database: now properly checks graph_id and sorts on x instead of the deprecated point_order column.