Why is price plotted as a dependent variable? Watch the video from 5:35:

law of demand

In the description, the narrator says that &quot;demand depends on price&quot;.
However, in the plot, he is keeping price &quot;P&quot; as the dependent variable.

How does that make sense?
In supply and demand model both price depends on quantity and quantity depends on price. These two variables are determined together. They are both endogenous variables. Consequently, here the rule that independent variable goes on $x$-axis and dependent variable goes on $y$-axis does not apply because neither of the two variables is exogenous.
By convention in economics price is always plotted on $y$-axis. This was not historically always the case. As you can see in this answer in past there were several authors that decided to plot price on $x$-axis as well. However, the convention of price going on $y$-axis was eventually established by Marshall who considered price to be the depend variable (although really they are both endogenous), and popularized this convention through his textbook (Principles of Economics) that was widely used.