{"action":"created","issue":{"url":"https://api.github.com/repos/gonum/plot/issues/472","repository_url":"https://api.github.com/repos/gonum/plot","labels_url":"https://api.github.com/repos/gonum/plot/issues/472/labels{/name}","comments_url":"https://api.github.com/repos/gonum/plot/issues/472/comments","events_url":"https://api.github.com/repos/gonum/plot/issues/472/events","html_url":"https://github.com/gonum/plot/issues/472","id":366396928,"node_id":"MDU6SXNzdWUzNjYzOTY5Mjg=","number":472,"title":"Bar chart with numerical horizontal axis","user":{"login":"hlalibe","id":36799424,"node_id":"MDQ6VXNlcjM2Nzk5NDI0","avatar_url":"https://avatars2.githubusercontent.com/u/36799424?v=4","gravatar_id":"","url":"https://api.github.com/users/hlalibe","html_url":"https://github.com/hlalibe","followers_url":"https://api.github.com/users/hlalibe/followers","following_url":"https://api.github.com/users/hlalibe/following{/other_user}","gists_url":"https://api.github.com/users/hlalibe/gists{/gist_id}","starred_url":"https://api.github.com/users/hlalibe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlalibe/subscriptions","organizations_url":"https://api.github.com/users/hlalibe/orgs","repos_url":"https://api.github.com/users/hlalibe/repos","events_url":"https://api.github.com/users/hlalibe/events{/privacy}","received_events_url":"https://api.github.com/users/hlalibe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-03T15:27:36Z","updated_at":"2018-10-03T15:33:12Z","closed_at":null,"author_association":"NONE","body":"Can't find a way to have a proper numerical values for the horizontal axis in a vertical bar chart.\r\nI can give each bar a label on the horizontal axis, that works,\r\nI can give them an index number 1,2,3,...\r\nBut i cannot place them at a specific value, for example first bar at 1, then second bar at 3 so there are no bars showing at 2...\r\nIs this possible ?\r\nCurrent code with index\r\n```\r\nimport (\r\n    \"gonum.org/v1/plot/plotter\"\r\n    \"gonum.org/v1/plot\"\r\n    \"log\"\r\n    \"io/ioutil\"\r\n    \"gonum.org/v1/plot/vg\"\r\n)\r\n// Create the plot values and labels.\r\n\r\n//create empty slice\r\nvar gain_loss plotter.Values\r\n//sequence := make([]string, 199)\r\nsequence := make([]int, 199)\r\n//read rows of gain_loss and append together in slice\r\nfor l := 0; l < 198; l++ {\r\n    //gain_loss\r\n    stringup := orders[l][4]\r\n    if err != nil {\r\n        panic(err)\r\n    }\r\n    gain_loss = append(gain_loss, stringup)\r\n}\r\n\r\n//read rows of sequence and append together in slice\r\nfor m := 0; m < 198; m++ {\r\n    //sequence\r\n    //stringup := orders[m][0]\r\n    //stringup := strconv.FormatFloat(orders[m][0], 'f', 6 ,64)\r\n    stringup := int(orders[m][0])\r\n    if err != nil {\r\n        panic(err)\r\n    }\r\n    sequence = append(sequence, stringup)\r\n}\r\n   \r\n//verticalLabels := []string{\"A\", \"B\", \"C\", \"D\"}\r\n//verticalLabels = sequence\r\n\r\n// Create a vertical BarChart\r\np1, err := plot.New()\r\nif err != nil {\r\n    log.Panic(err)\r\n}\r\nverticalBarChart, err := plotter.NewBarChart(gain_loss, 0.1*vg.Centimeter)\r\nif err != nil {\r\n    log.Panic(err)\r\n}\r\np1.Add(verticalBarChart)\r\n//p1.NominalX(verticalLabels...)\r\nerr = p1.Save(1600, 300, \"profit.png\")\r\nif err != nil {\r\n    log.Panic(err)\r\n}\r\n\r\n//display on screen\r\nbytes, err := ioutil.ReadFile(\"profit.png\")\r\ndisplay.PNG(bytes)\r\n```"},"comment":{"url":"https://api.github.com/repos/gonum/plot/issues/comments/426682365","html_url":"https://github.com/gonum/plot/issues/472#issuecomment-426682365","issue_url":"https://api.github.com/repos/gonum/plot/issues/472","id":426682365,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjY4MjM2NQ==","user":{"login":"ctessum","id":6193153,"node_id":"MDQ6VXNlcjYxOTMxNTM=","avatar_url":"https://avatars1.githubusercontent.com/u/6193153?v=4","gravatar_id":"","url":"https://api.github.com/users/ctessum","html_url":"https://github.com/ctessum","followers_url":"https://api.github.com/users/ctessum/followers","following_url":"https://api.github.com/users/ctessum/following{/other_user}","gists_url":"https://api.github.com/users/ctessum/gists{/gist_id}","starred_url":"https://api.github.com/users/ctessum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctessum/subscriptions","organizations_url":"https://api.github.com/users/ctessum/orgs","repos_url":"https://api.github.com/users/ctessum/repos","events_url":"https://api.github.com/users/ctessum/events{/privacy}","received_events_url":"https://api.github.com/users/ctessum/received_events","type":"User","site_admin":false},"created_at":"2018-10-03T15:33:12Z","updated_at":"2018-10-03T15:33:12Z","author_association":"CONTRIBUTOR","body":"Can you just give the bar at 2 a zero value?"}}
{"actor":{"display_login":"ctessum"}}