This was relating to what was, debatably, the second most important election in US history, after the election of 1860 that touched off the Civil War. It was nearly as contentious.
In Florida (with 4 electoral votes), Louisiana (with 8), and South
Carolina (with 7), reported returns favored Tilden, but election
results in each state were marked by fraud and threats of violence
against Republican voters. One of the points of contention revolved
around the design of ballots. At the time, parties would print ballots
or "tickets" to enable voters to support them in the open ballots. To
aid illiterate voters the parties would print symbols on the tickets.
In this election, however, many Democratic ballots were printed with
the Republican symbol, Abraham Lincoln, on them. The
Republican-dominated state electoral commissions subsequently
disallowed a sufficient number of Democratic votes to award their
electoral votes to Hayes.
In two southern states, the governor
recognized by the United States had signed the Republican
certificates. The Democratic certificates from Florida were signed by
the state attorney-general and the new Democratic governor. Those from
Louisiana were signed by the Democratic gubernatorial candidate, and
those from South Carolina by no state official. In the latter state,
the Tilden electors simply claimed that they were chosen by the
popular vote and so they were rejected by the state election board
Congress tried to solve the issue by creating a commission. That worked about as well as congressional commissions resolve political issues in the USA today (which is to say, not at all).
An important thing to realise here is that Nast was a Republican, writing editorial cartoons for a Republican newspaper. So he would have been quite exercised about the reported violence and threats against Republican voters in the states in question. This is the same type of political violence from which we get the term "waving the bloody shirt". There isn't much dobut that terrorist paramilitary groups supporting the Democratic Party were active in those states.
Hence the violent imagery with the whip and the gun. The idea behind the cartoon is both to remind the viewer of the violent implements that the Democrats were (according to him) actually using to get them into that situation, and invoking the absurdity of the idea of "compromising" with a person holding you at gunpoint.
On the other hand, Nast would have been a bit more willing to overlook the apparent results of the actual votes on paper than perhaps we are today.
Eventually the two parties came to an implicit agreement: Democrats acquiesced to a Republican victory, and Republicans removed all remaining Federal troops from the South. This essentially ended Reconstruction in the South. It was replaced with a system of Democratic political control backed by racist laws and terrorisim to keep African Americans from involving themselves in the area's mainstream political and social processes again. This state of affairs lasted more or less unchanged until the 1950's, and is typically referred to as Segregation, or Jim Crow.