{"action":"created","issue":{"url":"https://api.github.com/repos/africanmathsinitiative/Instat/issues/2285","repository_url":"https://api.github.com/repos/africanmathsinitiative/Instat","labels_url":"https://api.github.com/repos/africanmathsinitiative/Instat/issues/2285/labels{/name}","comments_url":"https://api.github.com/repos/africanmathsinitiative/Instat/issues/2285/comments","events_url":"https://api.github.com/repos/africanmathsinitiative/Instat/issues/2285/events","html_url":"https://github.com/africanmathsinitiative/Instat/issues/2285","id":189619384,"number":2285,"title":"Graphs in Output window","user":{"login":"FrancoisJRenaud","id":22272110,"avatar_url":"https://avatars.githubusercontent.com/u/22272110?v=3","gravatar_id":"","url":"https://api.github.com/users/FrancoisJRenaud","html_url":"https://github.com/FrancoisJRenaud","followers_url":"https://api.github.com/users/FrancoisJRenaud/followers","following_url":"https://api.github.com/users/FrancoisJRenaud/following{/other_user}","gists_url":"https://api.github.com/users/FrancoisJRenaud/gists{/gist_id}","starred_url":"https://api.github.com/users/FrancoisJRenaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrancoisJRenaud/subscriptions","organizations_url":"https://api.github.com/users/FrancoisJRenaud/orgs","repos_url":"https://api.github.com/users/FrancoisJRenaud/repos","events_url":"https://api.github.com/users/FrancoisJRenaud/events{/privacy}","received_events_url":"https://api.github.com/users/FrancoisJRenaud/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-11-16T07:44:18Z","updated_at":"2016-11-17T09:52:57Z","closed_at":null,"body":"Created this issue to keep record of our progress and start the few discussions that will be necessary for deciding the implementation strategy.\r\n\r\n@maxwellfundi identified how to save a ggplot graphs easily with ggsave function :+1: http://docs.ggplot2.org/0.9.2.1/ggsave.html\r\nHe will add more details below.\r\n\r\nThen I m exploring the Richtextbox and Flow document to see what's possible. So far there are different features available, such as resizing the splayed graph within the output window, saving copying image directly from the output window, inserting command buttons etc. So would probably be good to discuss a little what we want to be able to do with these graphs in the output. I remember Roger mentioning that it would be nice to open different graphs at the same time in different windows, and being able to drag them around and compare them. So might want to have something like _Right-click_ on the graph,  _open in new window_, or something ?\r\n\r\nhttps://msdn.microsoft.com/en-us/library/aa970779(v=vs.110).aspx\r\nhttps://msdn.microsoft.com/en-us/library/aa970909(v=vs.110).aspx\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/africanmathsinitiative/Instat/issues/comments/261202782","html_url":"https://github.com/africanmathsinitiative/Instat/issues/2285#issuecomment-261202782","issue_url":"https://api.github.com/repos/africanmathsinitiative/Instat/issues/2285","id":261202782,"user":{"login":"FrancoisJRenaud","id":22272110,"avatar_url":"https://avatars.githubusercontent.com/u/22272110?v=3","gravatar_id":"","url":"https://api.github.com/users/FrancoisJRenaud","html_url":"https://github.com/FrancoisJRenaud","followers_url":"https://api.github.com/users/FrancoisJRenaud/followers","following_url":"https://api.github.com/users/FrancoisJRenaud/following{/other_user}","gists_url":"https://api.github.com/users/FrancoisJRenaud/gists{/gist_id}","starred_url":"https://api.github.com/users/FrancoisJRenaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrancoisJRenaud/subscriptions","organizations_url":"https://api.github.com/users/FrancoisJRenaud/orgs","repos_url":"https://api.github.com/users/FrancoisJRenaud/repos","events_url":"https://api.github.com/users/FrancoisJRenaud/events{/privacy}","received_events_url":"https://api.github.com/users/FrancoisJRenaud/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T09:52:56Z","updated_at":"2016-11-17T09:52:56Z","body":"So my knowledge on these subjects is quite limited. There exists a System.Windows.Forms.webBrowser control (_https://msdn.microsoft.com/en-us/library/sxc145fz(v=vs.110).aspx_), which makes it easy to display html files.\r\n\r\nHowever, displaying/\"render\" html files in a richTextBox seems to be problematic. Either need to get an enriched richtextbox with added methods (_http://www.codeproject.com/Articles/12172/An-extended-RichTextBox-to-save-and-load-quot-HTML_), (_http://stackoverflow.com/questions/13509760/displaying-html-content-inside-of-a-textbox_), or convert file to RTF (_http://stackoverflow.com/questions/150208/how-do-i-convert-html-to-rtf-rich-text-in-net-without-paying-for-a-component_). \r\nAlso found this option to \"Load\" html file in richtextbox, but not \"render\" : \r\n`txtBody.Text = IO.File.ReadAllText(\"C:\\testmal2.htm\") `\r\n\r\n_https://www.experts-exchange.com/questions/27017013/How-to-load-html-file-to-richtextbox.html_\r\n\r\nSo I guess that's not what you had in mind ? The webBrowser would be separate from the output window. Can be used to display graphs separately, but then the ones that are sent to the output window would necessarily be in another format ? So not sure graphs in output + webrowser works smoothly... Can investigate the webBrowser option as merely an alternative to displaying in output window.\r\n\r\nAsked to @Lunalo why you were suggesting html option, he said that you can indeed save graphics outputs into html files. Maybe @Lunalo you can expand on this here ? ggsave doesn't save graphics into html files though... \r\n\r\nSo far I have the feeling that this option is a bit more tricky, but might just be because I don't have enough info yet. If we want to display graphics in another window, from what I know so far, we could simply use another flowDocument viewer or something like that. I don't know how things are done for the moment. Could check on this. \r\n\r\n"}}
{"actor":{"display_login":"FrancoisJRenaud"}}