Ask Your Question
0

How to make a 2D chart and use letters for labeling?

asked 2016-09-04 17:32:31 -0600

Hello,

I am new at using sage and I would like to know how to make a 2D chart and use letters for labeling? The y axis is going to have numbers (wage), but the x axis needs to have months.

Thank you

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-09-05 14:23:47 -0600

Here's one way to get what you want:

data = [[1,15],[2,19],[3,18],[4,22],[5,15]]
list_plot(data, plotjoined=True, ticks=[[1,2,3,4,5],1],
          tick_formatter=[['Jan','Feb','Mar','Apr','May'],1])

And here's a live example.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2016-09-04 17:32:31 -0600

Seen: 27 times

Last updated: Sep 05 '16