I felt like I just wrote about this the other day.... well technically I did. Seems like every thread regarding NASA funding inevitably evolves into a debate on NASA vs. defense.
Anyways, for OP, first a critique since this is /r/dataisbeautiful: logarithmic scale can be very misleading so be careful with its use. The WW2 peak gets diminished (and at over 50% of the GDP during the war years, it goes to show you what total war really means), and the seemingly small differences on the chart are often major differences in a non-log chart.
Even then though, you'd run into the problem that the log chart won't show the vast changes in defense spending since the Korean War, like it does here from 1948 to today or even better yet, here from 1988 to today, which shows the 8% to under 4% drop in the past two and a half decades. To make the log-chart a little better, consider removing the data before the Korean War - that would help make the fluctuations and changes more noticeable.
Also, I'd check your sources on defense spending, or at least come up with how you calculated total defense spending. The US is at 3.5% of GDP for 2014, not the ~5% you have in your OP chart and non-log version you linked.
Now for the political side, let me preface this by saying that I'm a big supporter of NASA getting more funding, and would love if NASA had a more focused manned exploration mission plan on board instead of becoming the political battleground it has become for Congress and the President. With that being said, a lot of the discussions regarding their budget make it sound like it is an either-or situation regarding funding, and they're often laden with incorrect numbers or statistics that make the supporters and detractors sound even more biased, much like the debate over NASA's funding itself.
For one, as big as the US military budget is (around $600-640 billion this past year), it's not even the second largest budget item on the federal budget. In fact, it is the third largest, behind Social Security and Medicare/Medicaid. At this point, the whole talk of it being mandatory vs. discretionary spending is semantics - Congress has routinely raided the coffers of the Social Security and Medicare/Medicaid taxes, and it's still tax dollars removed from our paychecks to pay current beneficiaries, whomever Congress changes eligibility for or lends to.
People bring up education too and highlight how little the federal government spends on education. It's true, the US federal government spends very little on education - but that's because state and local government spends money on education. In fact, state and local spends the most on education, putting the US at over 6.9% of its GDP on education alone (nearly twice that of the military too), far more than most nations in the world.
In fact, the US is only behind Austria, Switzerland, and Norway in terms of money spent per student, and the most in terms of money spent on postsecondary education, and the US has had better scores than Austria but worse than Switzerland and Norway.
Furthermore, people all too quickly forget the connection between NASA and the US Military. The peak in NASA spending in the 60s is no coincidence - this was the height of the Cold War, and both the US and Soviet Union wanted to show their technological dominance, and space was the obvious area to demonstrate. Both saw military considerations from space, and saw it important to demonstrate their capabilities since dominance of space means dominance on Earth.
The first astronauts were all sent into space on converted ICBMs originally designed to launch nuclear weapons around the world at a moment's notice. The first astronauts were all military officers as well. And, many of NASA's aerospace projects have been related to military aviation. It's a part of the reason why NASA only hires US citizens - space has many dual-use technologies shared with the military.
Furthermore, the US space budget is more than just NASA. There is considerable overlap between the US agencies and departments when it comes to space. For one, the US actually spends over $60 billion a year on space: over $40 billion of which goes to defense-related projects.
However, that budget has huge applications outside of the military:
It's no coincidence that the three nations with independent human spaceflight - Russia, the US, and China - have historically had the highest military budget on Earth.