I'll follow up on my comment, as none of the answers go in this direction, and I don't think you're getting the greatest advice.
While I have no way of knowing whether this applies to you or not,
making figures and such might not reach the intellectual contribution
necessary to be counted as an author. This is why Acknowledgement
sections exist. Before deciding on how to respond, think about what
your scientific contribution was.
You may or may not have made a contribution that merits inclusion as an author. Some labs/PI's are very generous about this, and some are not, but if your work was purely "technical", my own inclination would be to offer Acknowledgement and not authorship.
Generating figures: scientific illustrators do this every day as a living (less so these days, but they're still around) and don't get authorship. Photographers too.
Writing code: this is a little less clear, and probably depends on direct contribution to algorithms. If you are, for example, writing code that takes the mean and standard deviation and spits them out in a readable format, that's technical. If you HAD TO UNDERSTAND THE SCIENCE in the paper to write the code, that would push me toward authorship. If I could hire a contractor who knew nothing of the research to do it, I'd lean toward acknowledgement.
There's a disconnect here between the your perception of the contribution you're making and your PI's perception. Just because he feels that your scientific contribution was "minimal", that does not mean he doesn't believe your work is valuable.
You might sit down with him and ask if there's any way you can make deeper contributions to his body of work, or if there's a small project you can really make your own. Another option would be to use the experience you've gained there to apply for summer research opportunities (depending on what year you're in).
Of course, there are curmudgeons who just won't believe that an undergrad can make author-level contributions regardless of the contribution made, and that's unacceptable. As I said before, from your description I have no way of telling whether you're dealing with someone in this category, or whether your contributions were of a basic technical level that arguably don't merit authorship.
I can say that many moons ago, as an undergrad, I was doing single-unit neural recordings in spinal cords (running electrodes up and down, listening for neural activity), and building electronic lab apparatus that helped with the experiments, and doing histology. Some of the rasters I generated were used directly in publications. I didn't consider that authorship level work then, and I still don't, as any technician could have done it, but it was certainly a valuable experience that helped launch my career. Now, almost 30 years later, I'm still in touch with the PI of the lab (I was working for his postdoc), and he's been a wonderful advocate of mine throughout my career.
Your PI's recommendation, at this point, should be treated as a valuable commodity, and if you negotiate this disconnect with maturity, that letter will be even better. Also, the experience you gain now will give you something real to talk about during interviews, which is also incredibly valuable.
Directly relevent: What are the minimum contributions required for co-authorship