{"action":"created","issue":{"url":"https://api.github.com/repos/dfm/daft/issues/103","repository_url":"https://api.github.com/repos/dfm/daft","labels_url":"https://api.github.com/repos/dfm/daft/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/dfm/daft/issues/103/comments","events_url":"https://api.github.com/repos/dfm/daft/issues/103/events","html_url":"https://github.com/dfm/daft/issues/103","id":332537975,"node_id":"MDU6SXNzdWUzMzI1Mzc5NzU=","number":103,"title":"\"The system cannot find the file specified\" during pgm.figure.savefig()","user":{"login":"aaronsteers","id":18150651,"node_id":"MDQ6VXNlcjE4MTUwNjUx","avatar_url":"https://avatars2.githubusercontent.com/u/18150651?v=4","gravatar_id":"","url":"https://api.github.com/users/aaronsteers","html_url":"https://github.com/aaronsteers","followers_url":"https://api.github.com/users/aaronsteers/followers","following_url":"https://api.github.com/users/aaronsteers/following{/other_user}","gists_url":"https://api.github.com/users/aaronsteers/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronsteers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronsteers/subscriptions","organizations_url":"https://api.github.com/users/aaronsteers/orgs","repos_url":"https://api.github.com/users/aaronsteers/repos","events_url":"https://api.github.com/users/aaronsteers/events{/privacy}","received_events_url":"https://api.github.com/users/aaronsteers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-14T19:41:40Z","updated_at":"2018-07-24T06:48:06Z","closed_at":null,"author_association":"NONE","body":"I just installed daft (`pip install daft`) on my Windows machine but the last step of all of the samples is failing while trying to save the file.\r\n\r\nSource Code (from sample):\r\n```\r\nfrom matplotlib import rc\r\nrc(\"font\", family=\"serif\", size=12)\r\nrc(\"text\", usetex=True)\r\n\r\nimport daft\r\n\r\npgm = daft.PGM([3.6, 1.8], origin=[2.2, 1.6], aspect=2.1)\r\npgm.add_node(daft.Node(\"confused\", r\"confused\", 3.0, 3.0))\r\npgm.add_node(daft.Node(\"ugly\", r\"ugly font\", 3.0, 2.0, observed=True))\r\npgm.add_node(daft.Node(\"bad\", r\"bad talk\", 5.0, 2.0, observed=True))\r\npgm.add_edge(\"confused\", \"ugly\")\r\npgm.add_edge(\"ugly\", \"bad\")\r\npgm.add_edge(\"confused\", \"bad\")\r\npgm.render()\r\npgm.figure.savefig(\"badfont.pdf\")\r\npgm.figure.savefig(\"badfont.png\", dpi=150)\r\n```\r\n\r\nError message:\r\n```\r\nTraceback (most recent call last):\r\n  File \".\\job_manager\\compiler\\visualizer.py\", line 15, in <module>\r\n    pgm.figure.savefig(\"badfont.pdf\")\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\figure.py\", line 2035, in savefig\r\n    self.canvas.print_figure(fname, **kwargs)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\backend_bases.py\", line 2263, in print_figure\r\n    **kwargs)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\backends\\backend_pdf.py\", line 2586, in print_pdf\r\n    self.figure.draw(renderer)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\artist.py\", line 55, in draw_wrapper\r\n    return draw(artist, renderer, *args, **kwargs)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\figure.py\", line 1475, in draw\r\n    renderer, self, artists, self.suppressComposite)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\image.py\", line 141, in _draw_list_compositing_images\r\n    a.draw(renderer)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\artist.py\", line 55, in draw_wrapper\r\n    return draw(artist, renderer, *args, **kwargs)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\axes\\_base.py\", line 2607, in draw\r\n    mimage._draw_list_compositing_images(renderer, self, artists)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\image.py\", line 141, in _draw_list_compositing_images\r\n    a.draw(renderer)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\artist.py\", line 55, in draw_wrapper\r\n    return draw(artist, renderer, *args, **kwargs)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\text.py\", line 2301, in draw\r\n    Text.draw(self, renderer)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\artist.py\", line 55, in draw_wrapper\r\n    return draw(artist, renderer, *args, **kwargs)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\text.py\", line 706, in draw\r\n    bbox, info, descent = textobj._get_layout(renderer)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\text.py\", line 300, in _get_layout\r\n    ismath=False)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\backends\\backend_pdf.py\", line 2148, in get_text_width_height_descent\r\n    renderer=self)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\texmanager.py\", line 501, in get_text_width_height_descent\r\n    dvifile = self.make_dvi(tex, fontsize)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\texmanager.py\", line 365, in make_dvi\r\n    texfile], tex)\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\matplotlib\\texmanager.py\", line 335, in _run_checked_subprocess\r\n    stderr=subprocess.STDOUT)\r\n  File \"C:\\Program Files\\Python36\\lib\\subprocess.py\", line 336, in check_output\r\n    **kwargs).stdout\r\n  File \"C:\\Program Files\\Python36\\lib\\subprocess.py\", line 403, in run\r\n    with Popen(*popenargs, **kwargs) as process:\r\n  File \"C:\\Program Files\\Python36\\lib\\subprocess.py\", line 709, in __init__\r\n    restore_signals, start_new_session)\r\n  File \"C:\\Program Files\\Python36\\lib\\subprocess.py\", line 997, in _execute_child\r\n    startupinfo)\r\nFileNotFoundError: [WinError 2] The system cannot find the file specified\r\n```"},"comment":{"url":"https://api.github.com/repos/dfm/daft/issues/comments/407299862","html_url":"https://github.com/dfm/daft/issues/103#issuecomment-407299862","issue_url":"https://api.github.com/repos/dfm/daft/issues/103","id":407299862,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzI5OTg2Mg==","user":{"login":"davidwhogg","id":710750,"node_id":"MDQ6VXNlcjcxMDc1MA==","avatar_url":"https://avatars0.githubusercontent.com/u/710750?v=4","gravatar_id":"","url":"https://api.github.com/users/davidwhogg","html_url":"https://github.com/davidwhogg","followers_url":"https://api.github.com/users/davidwhogg/followers","following_url":"https://api.github.com/users/davidwhogg/following{/other_user}","gists_url":"https://api.github.com/users/davidwhogg/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwhogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwhogg/subscriptions","organizations_url":"https://api.github.com/users/davidwhogg/orgs","repos_url":"https://api.github.com/users/davidwhogg/repos","events_url":"https://api.github.com/users/davidwhogg/events{/privacy}","received_events_url":"https://api.github.com/users/davidwhogg/received_events","type":"User","site_admin":false},"created_at":"2018-07-24T06:48:06Z","updated_at":"2018-07-24T06:48:06Z","author_association":"COLLABORATOR","body":"Can you make a matplotlib plot that uses LaTeX labels, as in\r\n```\r\nplt.plot([0., 1.], [0., 1.])\r\nplt.xlabel(r\"$x$\")\r\nplt.savefig(\"foo.png\")\r\n```\r\nand see if that works?"}}
{"actor":{"display_login":"davidwhogg"}}