update plot_dofs.py for 1D