I have a huge project for my grade 11 physics class. I've just started using latex and i want to know how to plot a graph but as in the picture shows, the x axis is in the middle of the graph opposed as to the many I've seen online being on either side. Could someone provide me with the exact code for the picture shown?
And if someone can be so kind Could someone provide me with dotted grid lines? Thanks!
Best Answer
There are a number of different plotting packages for LaTeX, the most popular ones probably being PGFPlots and
pst-plot
. They have different advantages and drawbacks, so it's hard to give a general recommendation which one to use. For straightforward plots like this, any plotting package will be fine.Here's an example of creating a plot like the one you show in your question using PGFPlots: