1

Hey Guys,

This seems like a basic problem with an easy answer but I simply cannot figure it out no matter how much I try.

I am trying to create a line graph based on two lists. For my x-axis, I want my list to be a set of strings.

x_axis_list = ["Jan-06","Jul-06","Jan-07","Jul-07","Jan-08"]
y_axis_list = [5,7,6,8,9]

Any suggestions on how to best graph these items?

2
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by rasizzle
0
x_axis_list = ["Jan-06","Jul-06","Jan-07","Jul-07","Jan-08"]
y_axis_list = [5,7,6,8,9]

In matplotlib you can use xticks()

The first list is where each text piece will be placed, and the second is a tuple of strings.

xticks([1,2,3,4,5], ("Jan-06","Jul-06","Jan-07","Jul-07","Jan-08"))
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.