Mets manager Buck Showalter of the Mets looks on from the...

Mets manager Buck Showalter of the Mets looks on from the dugout in the fifth inning against the Marlins in the spring training game at Roger Dean Stadium on March 21 in Jupiter, Fla. Credit: Getty Images/Mark Brown

PORT ST. LUCIE, Fla. — On a scale of 1 to Opening Day, the Mets’ lineup in their 5-3 exhibition loss to the Astros on Wednesday night looked much closer to the latter.

Except for Jeff McNeil, who had the day off, all of the anticipated regulars were in there, starting with a fearsome foursome: Brandon Nimmo, Starling Marte, Francisco Lindor and Pete Alonso.

“It’s getting there,” manager Buck Showalter said. “Getting close.”

Settling on a batting order is an art and — with the boom of data-based decision-making in recent years — a science. And it is a part of the game that Showalter, heading into his 21st season as a major-league manager, has feelings about.

Foremost among those feelings: The Mets’ order probably will be dynamic, not static.

“You’d love to have a lineup you’re never going to touch, but that doesn’t put our best foot forward in a lot of ways,” he said. “Physically, knowing there’s going to be some people [who are unavailable at times]. If we stay healthy, we’ll have a lineup that we can spread the load around with.”

The decisions at the top are relatively easy. Nimmo has elite on-base skills, making him a prototypical modern leadoff hitter. Showalter, smirking, called him “a strong option” to occupy the No. 1 spot regularly. He has been there in all six spring-training games in which he has participated.

Behind Nimmo the past two contests has been Marte, who said batting second is his strong preference — one team decision-makers seem ready to accommodate (unlike his desire to play centerfield instead of rightfield, where the Mets have him penciled in).

Some clubs in recent years have put their best hitter in the No. 2 spot. The Nationals, for example, plan on hitting Juan Soto there. The Yankees have done it with Aaron Judge.

The Mets don’t have an obvious choice, though Nimmo and Alonso (who has done it a bunch) have the best cases.

“There’s some validity to that, depending on who it is,” Showalter said. “[Maybe] you have a number of people capable of being that guy. I like the idea of looking how the other manager would defend a certain lineup. If you’re facing a starting pitcher that has a habit of going deep into games, you can throw a little more caution to the wind.”

He explained that alternating between righthanded hitters and lefthanded hitters — which mostly is a defense against relievers who struggle against one or the other — might not matter if the opposing starting pitcher is excellent.

“That’s a really good lineup but guess what?” Showalter said. “The starter pitched eight innings and you’re beat.”

The rest of the lineup is where it gets tricky (and where the frequent tweaking may come), mostly because of the Mets’ many interchangeable pieces. That will include a daily DH decision of Dominic Smith versus J.D. Davis versus Robinson Cano.

On Wednesday the bottom five were Cano, Eduardo Escobar, Mark Canha, Davis and James McCann.

Slotting McCann, a light-hitting catcher, into the final spot would be the traditional move. But sometimes teams treat the No. 9 hole as a place for a so-called second leadoff guy.

Enter Canha. He was an above-average hitter with the Athletics, for whom he was the regular No. 1 last year. His level of production would make him an unorthodox choice to bat last. But he ranked sixth in the majors in 2021 by seeing 4.23 pitches per plate appearance.

“You might say that’s a great spot for the nine-hole,” Showalter said. “The nine-hole is one of the more important spots in baseball.”

Then again, maybe none of this matters if the Mets don’t score. They are seeking to improve greatly on their 3.93 runs per game — fourth fewest in baseball — last season.

“It depends on how we’re doing as a team,” Nimmo said. “If I do well in that [leadoff] position and the team does well with me in that position, I’m sure I’ll stay. But if the team isn’t producing runs, I would expect that to be fluid."

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months
ACT NOWSALE ENDS SOON | CANCEL ANYTIME