Have other people review what you produce.
Learn by doing is wonderful when it works but if you don't show your work to others you're trusting the judgment of someone who actually doesn't know what they're doing aren't you? :)
In the agile world of software development the typical time box is two weeks. Produce something (in your case a graph) in two weeks then subject it to review by other people. If it fails you go back and fix it. Otherwise move on to the next graph. Learn what you need to know to make each thing as you go. Sure, your first few graphs will suck compared to your later ones but worry about that when you're sure you can do better AND you have time.
You can fiddle with the two week time box but keep in mind that the more time you have between reviews the more rope you've got to hang yourself with. It really stinks to spend two months making something only to be told its worthless or already exists. You can try to make the time box smaller. The risk there is that your reviewer will get sick of helping you if you ask for reviews to often.
Neat trick here is that almost everyone can be effective as a reviewer even when they aren't an expert in what you are doing. So you can take your work before many people to get feedback so long as you can get them interested.
This way you get results and learn as you go. You will learn mostly what you need to know to finish that project. If you are feeling the need to take time off to learn new skills then what you're really asking for isn't time off. It's another project. One that needs those skills.
Sometimes a project runs you into an area where your skill set is weak. That's bound to happen eventually. You can respond by panicking and putting everything on hold while you fill in your skill set or you can get some help from someone and create a plan to learn and create just what you need to get back to your project.
If, say, you want to learn something (that helps you make graphs) then great, what are you going to make while you learn it? If you can't produce a graph in two weeks what can you produce? Break the problem down until the first chunk is something you're confident you can do in two weeks. Whatever it is you should also find a way to test it. If it's a language, and you've made something that works, you can get it peer reviewed at https://codereview.stackexchange.com/. So yeah, you're right back into that two week time box. When times up you darn well should have made something to show someone.
Sometimes you just need some more freedom to explore. A long demanding project can become a tyrant in your life. It will force you to learn what it needs, not necessarily what you find interesting. Taking time away from it and working on something related can be good to help you refresh but don't fool yourself into thinking you're accomplishing something while doing this. At most you're just learning something.
I've been programming professionally in Java for about 4 years now. You might think I'd be done learning it by now, but no, I haven't. I've been programming in some language or another for decades. You might think there is some language that I'm done learning, but no, there isn't.
I'd hate to think what would have happened if I waited to be done learning a language before producing something in it. Probably not a career.