Ask Your Question
0

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

asked 2016-09-05 00:32:31 +0100

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 21:23:47 +0100

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-05 00:32:31 +0100

Seen: 193 times

Last updated: Sep 05 '16