fixed query for plotting degrees