2

Right now my graphing function looks this.

def makeGraph(data, name, title, xlab):
    g = Gnuplot.Gnuplot(persist=1)
    g.title(title)
    g('set terminal png truecolor')
    g('set output "'+name+'"')
    g('set ylabel "# of Reservations"')
    g('set xlabel "'+xlab+'"')
    g('set style data histograms')
    g('set style fill solid 1.0 border -1')
    g.plot(data)

As you can see in the photo, everything is working as expected. Now, I would like to change the markings on the x axis (0-6) to Sun-Sat. I have been searching around, but have yet to successfully get it to work.

How graph outputs

1 Answer 1

4

See this. One way to achieve what you need is to use a command such as:

set xtics ("Sun" 0, "Mon" 1, "Tue" 2, "Wed" 3, "Thu" 4, "Fri" 5, "Sat" 6)
Sign up to request clarification or add additional context in comments.

1 Comment

Perfect, Thank you! My issue was I didn't have the numbers following the labels so it wasn't working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.