PHOENIX -- Turns out all the D-backs needed to snap out of their collective slump at the plate was a return to the warm desert air.

That, and a visit from the Rockies.

The D-backs snapped their three-game losing streak and Randy Johnson inched closer toward 300 wins on Tuesday night as Arizona beat the Rockies, 8-4, in front of 27,292 at Chase Field.

It was the D-backs' sixth win in seven games against the Rockies this year.

Arizona's offense collected 15 hits after a subpar offensive performance against the Cubs last weekend in Chicago where the temperatures were in the 40s and the D-backs were swept. Home has been a safe haven for the D-backs this year as they are tied for the best home record in the Majors at 15-7.

"In Chicago, things obviously didn't go our way so we got back home, washed our hands of that and jumped out early," right fielder Justin Upton said.

The D-backs scored three runs in each of the first two innings to give Johnson a 6-1 lead. It was a continuation of Rockies starter Jeff Francis' struggles this year against the Snakes.

The lefty, who is still searching for his first win, allowed eight runs on 13 hits in 4 2/3 innings. In three starts against the D-backs this year he has allowed 20 earned runs in 16 innings.

"I don't know what it is, to be honest with you. Jeff Francis is a great pitcher," Upton said. "He's switched up his game plan a couple of times. We just happened to be swinging the bats when we've seen him."

The D-backs certainly weren't swinging the bats well this past weekend when they managed seven runs in the three games.

"You feel good here," D-backs manager Bob Melvin said of Chase Field. "The conditions in Chicago were rough, balls not carrying, wind blowing in, we weren't swinging as good at the time. So it was good to get off to a good start like this, string a bunch of hits together and kind of get everybody involved."

Johnson also got off to a good start as he struck out the first two batters of the game and seemed to have good velocity on his fastball and bite on his slider. Through three innings, the Big Unit had only allowed one run on three hits.

The fourth, however, is not an inning the big left-hander will remember fondly.

Garrett Atkins led off the frame with a homer and Ryan Spillborghs doubled. Johnson then got on the rubber to pitch to the next batter from the windup rather than stretch position and when he realized his mistake, he compounded it by committing a balk.

Jeff Baker then hit a grounder back up the middle that Johnson reached for an deflected with his pitching hand as Baker reached on the single and Spillborghs scored.

The play bruised Johnson's left hand and raised his frustration level. It would only get worse as Yorvit Torrealba reached on an infield single that went in and out of the glove of a diving Mark Reynolds at third. Then with Reynolds playing in to cut off the run at the plate, the next batter, Jonathan Herrera, hit a grounder that was just out of the reach of Reynolds as he dove to his left.

All told, the Rockies scored three runs to turn a once comfortable Arizona lead into a 6-4 advantage.

"He can get frustrated with that stuff, admittedly so," Melvin said of Johnson. "Not his best stuff today, but he gives us five and we're in the lead when he leaves and he ends up getting a win. I know he was disappointed that he had to come out after five innings, but he's going to keep working and try to get deeper into games in the fashion he's used to pitching."

How frustrated Johnson was, or how he felt in the second inning when he tripped rounding first after hitting a ball off the wall in the second, isn't known because he left the clubhouse before reporters were allowed inside.

With the win, Johnson improved to 3-1 on the season and raised his career win total to 287, which ties him for 26th on the all-time list with Bert Blyleven.

D-backs shortstop Stephen Drew deserves some credit for the win as he hit a three-run homer in the second inning and made three outstanding plays in the field. Melvin moved Drew up to second in the order and like most moves made by the reigning National League Manager of the Year, this one paid off.

"I think he thrives on hitting up in the order," Melvin said. "We've always thought that he's a complete player and he shows flashes of it from time to time."