From mdboom at gmail.com Thu Jul 12 21:35:27 2018 From: mdboom at gmail.com (Michael Droettboom) Date: Thu, 12 Jul 2018 21:35:27 -0400 Subject: [Matplotlib-users] Officially passing the baton to Thomas Caswell Message-ID: All, This e-mail is just to announce and make explicit what has already been the case in reality for quite some time (since at least summer of 2016): that the leadership of the matplotlib project is in the very capable hands of Thomas Caswell. His ability to manage such a high velocity of issues and pull requests is beyond astonishing, and he's brought the project forward in ways that seemed remote when my involvement tapered off. Thomas remains a pleasure and inspiration to work with and I know John would be proud of how is creation is being shepherded. As part of formalizing this, there is a pull request to bring the matplotlib governance document draft into effect here: https://github.com/matplotlib/governance/pull/3 Best of luck, and keep up the good work, everyone! Michael Droettboom -------------- next part -------------- An HTML attachment was scrubbed... URL: From diego.avesani at gmail.com Sun Jul 15 11:30:21 2018 From: diego.avesani at gmail.com (diedro) Date: Sun, 15 Jul 2018 08:30:21 -0700 (MST) Subject: [Matplotlib-users] read file with date and plot it Message-ID: <1531668621550-0.post@n5.nabble.com> Dear all, I have created with fortran the following file: / 2013:01:02-01,-999.0000, 1.0000000E+00,1.0000000E+00 2013:01:02-02,-999.0000, 2.0000000E+00,0.0000000E+00 2013:01:02-03,-999.0000, 3.0000000E+00,2.0000000E+00 2013:01:02-04,-999.0000, 4.0000000E+00,0.0000000E+00 2013:01:02-05,-999.0000, 5.0000000E+00,3.0000000E+00/ .... I would like to read it and to plot data according to date so far this is what I do: /folder = 'meteo_stations' fname = 'stations_pp.txt' headers = ['date','dato1','dato2','dato3'] df = pd.read_csv('./'+folder+'/'+fname,) df.plot(x='date',y='dato2',)/ unfortunately, I get an error? what shall I do? Thanks for any kind of helps, Best regards -- Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html From luigifilippochiara at gmail.com Sun Jul 15 12:19:33 2018 From: luigifilippochiara at gmail.com (Luigi Filippo Chiara) Date: Sun, 15 Jul 2018 18:19:33 +0200 Subject: [Matplotlib-users] Help - Error using Latex font in Matplotlil (Anaconda, Python 3.6) Message-ID: Dear all, I tried for hours to find a solution to my problem but I was not able to get anywhere. I finally decided to write a mail here. I?m an Italian engineer student using matplotlib for my master thesis. I would like to print some figures with Matplotlib using a Latex font. I looked everywhere in the internet for simular problems, but no solution was posted. I?m trying to run the test code demo_tex.py which I found at http://matplotlib.org/users/usetex.html , but i get the following huge error (in blue). This is the first time I have an error using Matplotlib, it has always worked perfectly. runfile('/Users/Filippo/AnacondaProjects/Python/Advanced_Solids_Mechanics/demo_tex.py', wdir='/Users/Filippo/AnacondaProjects/Python/Advanced_Solids_Mechanics') Traceback (most recent call last): File "", line 1, in runfile('/Users/Filippo/AnacondaProjects/Python/Advanced_Solids_Mechanics/demo_tex.py', wdir='/Users/Filippo/AnacondaProjects/Python/Advanced_Solids_Mechanics') File "/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile execfile(filename, namespace) File "/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace) File "/Users/Filippo/AnacondaProjects/Python/Advanced_Solids_Mechanics/demo_tex.py", line 42, in plt.savefig('tex_demo') File "/anaconda3/lib/python3.6/site-packages/matplotlib/pyplot.py", line 710, in savefig res = fig.savefig(*args, **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/figure.py", line 2035, in savefig self.canvas.print_figure(fname, **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 2263, in print_figure **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 513, in print_png FigureCanvasAgg.draw(self) File "/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 433, in draw self.figure.draw(self.renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/figure.py", line 1475, in draw renderer, self, artists, self.suppressComposite) File "/anaconda3/lib/python3.6/site-packages/matplotlib/image.py", line 141, in _draw_list_compositing_images a.draw(renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 2607, in draw mimage._draw_list_compositing_images(renderer, self, artists) File "/anaconda3/lib/python3.6/site-packages/matplotlib/image.py", line 141, in _draw_list_compositing_images a.draw(renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/axis.py", line 1192, in draw renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/axis.py", line 1130, in _get_tick_bboxes extent = tick.label1.get_window_extent(renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/text.py", line 922, in get_window_extent bbox, info, descent = self._get_layout(self._renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/text.py", line 309, in _get_layout ismath=ismath) File "/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 232, in get_text_width_height_descent s, fontsize, renderer=self) File "/anaconda3/lib/python3.6/site-packages/matplotlib/texmanager.py", line 501, in get_text_width_height_descent dvifile = self.make_dvi(tex, fontsize) File "/anaconda3/lib/python3.6/site-packages/matplotlib/texmanager.py", line 365, in make_dvi texfile], tex) File "/anaconda3/lib/python3.6/site-packages/matplotlib/texmanager.py", line 335, in _run_checked_subprocess stderr=subprocess.STDOUT) File "/anaconda3/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/anaconda3/lib/python3.6/subprocess.py", line 403, in run with Popen(*popenargs, **kwargs) as process: File "/anaconda3/lib/python3.6/subprocess.py", line 709, in __init__ restore_signals, start_new_session) File "/anaconda3/lib/python3.6/subprocess.py", line 1344, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'latex': 'latex' Error in callback .post_execute at 0x10735e840> (for post_execute): Traceback (most recent call last): File "/anaconda3/lib/python3.6/site-packages/matplotlib/pyplot.py", line 149, in post_execute draw_all() File "/anaconda3/lib/python3.6/site-packages/matplotlib/_pylab_helpers.py", line 136, in draw_all f_mgr.canvas.draw_idle() File "/anaconda3/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 2055, in draw_idle self.draw(*args, **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 433, in draw self.figure.draw(self.renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/figure.py", line 1475, in draw renderer, self, artists, self.suppressComposite) File "/anaconda3/lib/python3.6/site-packages/matplotlib/image.py", line 141, in _draw_list_compositing_images a.draw(renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 2607, in draw mimage._draw_list_compositing_images(renderer, self, artists) File "/anaconda3/lib/python3.6/site-packages/matplotlib/image.py", line 141, in _draw_list_compositing_images a.draw(renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/axis.py", line 1192, in draw renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/axis.py", line 1130, in _get_tick_bboxes extent = tick.label1.get_window_extent(renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/text.py", line 922, in get_window_extent bbox, info, descent = self._get_layout(self._renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/text.py", line 309, in _get_layout ismath=ismath) File "/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 232, in get_text_width_height_descent s, fontsize, renderer=self) File "/anaconda3/lib/python3.6/site-packages/matplotlib/texmanager.py", line 501, in get_text_width_height_descent dvifile = self.make_dvi(tex, fontsize) File "/anaconda3/lib/python3.6/site-packages/matplotlib/texmanager.py", line 365, in make_dvi texfile], tex) File "/anaconda3/lib/python3.6/site-packages/matplotlib/texmanager.py", line 335, in _run_checked_subprocess stderr=subprocess.STDOUT) File "/anaconda3/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/anaconda3/lib/python3.6/subprocess.py", line 403, in run with Popen(*popenargs, **kwargs) as process: File "/anaconda3/lib/python3.6/subprocess.py", line 709, in __init__ restore_signals, start_new_session) File "/anaconda3/lib/python3.6/subprocess.py", line 1344, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'latex': 'latex' Traceback (most recent call last): File "/anaconda3/lib/python3.6/site-packages/IPython/core/formatters.py", line 341, in __call__ return printer(obj) File "/anaconda3/lib/python3.6/site-packages/IPython/core/pylabtools.py", line 241, in png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs)) File "/anaconda3/lib/python3.6/site-packages/IPython/core/pylabtools.py", line 125, in print_figure fig.canvas.print_figure(bytes_io, **kw) File "/anaconda3/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 2212, in print_figure **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 513, in print_png FigureCanvasAgg.draw(self) File "/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 433, in draw self.figure.draw(self.renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/figure.py", line 1475, in draw renderer, self, artists, self.suppressComposite) File "/anaconda3/lib/python3.6/site-packages/matplotlib/image.py", line 141, in _draw_list_compositing_images a.draw(renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 2607, in draw mimage._draw_list_compositing_images(renderer, self, artists) File "/anaconda3/lib/python3.6/site-packages/matplotlib/image.py", line 141, in _draw_list_compositing_images a.draw(renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "/anaconda3/lib/python3.6/site-packages/matplotlib/axis.py", line 1192, in draw renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/axis.py", line 1130, in _get_tick_bboxes extent = tick.label1.get_window_extent(renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/text.py", line 922, in get_window_extent bbox, info, descent = self._get_layout(self._renderer) File "/anaconda3/lib/python3.6/site-packages/matplotlib/text.py", line 309, in _get_layout ismath=ismath) File "/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 232, in get_text_width_height_descent s, fontsize, renderer=self) File "/anaconda3/lib/python3.6/site-packages/matplotlib/texmanager.py", line 501, in get_text_width_height_descent dvifile = self.make_dvi(tex, fontsize) File "/anaconda3/lib/python3.6/site-packages/matplotlib/texmanager.py", line 365, in make_dvi texfile], tex) File "/anaconda3/lib/python3.6/site-packages/matplotlib/texmanager.py", line 335, in _run_checked_subprocess stderr=subprocess.STDOUT) File "/anaconda3/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/anaconda3/lib/python3.6/subprocess.py", line 403, in run with Popen(*popenargs, **kwargs) as process: File "/anaconda3/lib/python3.6/subprocess.py", line 709, in __init__ restore_signals, start_new_session) File "/anaconda3/lib/python3.6/subprocess.py", line 1344, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'latex': 'latex'
I don?t understand why. I tried to do everything that was reported in the site. I?m using Matplotlib version 2.2.2, on Python version 3.6, launched from Spyder 3.2.8, lauched from Anaconda (Anaconda Navigator 1.8.7). Some other useful information: Operating system: macOS High Sierra version 10.13.5 (MacBook Pro). The result of name -a is: Darwin MacBook-Pro-di-Filippo-3.local 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64 Matplotlib installing location: '/anaconda3/lib/python3.6/site-packages/matplotlib/__init__.py? My matplotlib configuration and cache directories are both located in '/Users/Filippo/.matplotlib?, where I also tried to remove the file tex.cache (without any success). I obtained Matplotlib from Anaconda, I didn?t add any customizations to my matplotlibrc (in fact, I don?t know how to use matplotlilrc). I installed Latex using the latest version of MacTex and TexMaker. I verified that dvipng was installed too. I used home-brew to install the latest version of ghostscript (9.23). Ghostscript is now installed in the following location: /usr/local/Cellar/ghostscript/9.23 These are the locations of the previous files: I?m not really sure if latex, dvipng and ghostscript are really working on my PATH. They work whenever I call them from the command line, as in the following example: I don?t know if this was useful but I tried to link them to my PATH modifying my .bash_profile in the following way (I have the same error using Matplotlib even If don?t link them in this way)(Anaconda wrote automatically the first two lines when I installed it): I tried to do everything that I could, but I still unable to run Matplotlib and have a Latex font. What can I do? If you need more information just tell me. Thank you very much for your help. Best regards, Luigi Filippo Chiara -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: demo_tex.py Type: text/x-python-script Size: 1158 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2018-07-15 at 16.34.07.png Type: image/png Size: 56883 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2018-07-15 at 16.39.13.png Type: image/png Size: 64824 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2018-07-15 at 16.39.21.png Type: image/png Size: 97309 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2018-07-15 at 16.39.18.png Type: image/png Size: 518753 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2018-07-15 at 16.41.45.png Type: image/png Size: 204584 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From selasley at icloud.com Sun Jul 15 15:56:39 2018 From: selasley at icloud.com (Scott Lasley) Date: Sun, 15 Jul 2018 15:56:39 -0400 Subject: [Matplotlib-users] read file with date and plot it In-Reply-To: <1531668621550-0.post@n5.nabble.com> References: <1531668621550-0.post@n5.nabble.com> Message-ID: <49AE932D-DCFB-4010-9053-CB381D9756D7@icloud.com> Are you using the names parameter in read_csv to set the header names? This works for me headers = ['date','dato1','dato2','dato3'] df = pd.read_csv('./'+folder+'/'+fname, header=None, names=headers) df.plot(x='date',y='dato2',) > On Jul 15, 2018, at 11:30, diedro wrote: > > Dear all, > > I have created with fortran the following file: > > / > 2013:01:02-01,-999.0000, 1.0000000E+00,1.0000000E+00 > 2013:01:02-02,-999.0000, 2.0000000E+00,0.0000000E+00 > 2013:01:02-03,-999.0000, 3.0000000E+00,2.0000000E+00 > 2013:01:02-04,-999.0000, 4.0000000E+00,0.0000000E+00 > 2013:01:02-05,-999.0000, 5.0000000E+00,3.0000000E+00/ > .... > > I would like to read it and to plot data according to date > > so far this is what I do: > > /folder = 'meteo_stations' > fname = 'stations_pp.txt' > headers = ['date','dato1','dato2','dato3'] > df = pd.read_csv('./'+folder+'/'+fname,) > > df.plot(x='date',y='dato2',)/ > > unfortunately, I get an error? > > what shall I do? > > Thanks for any kind of helps, > > Best regards > > > > > > > > > -- > Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users From mbatr27 at gmail.com Mon Jul 16 12:16:03 2018 From: mbatr27 at gmail.com (Matthew Bradley) Date: Mon, 16 Jul 2018 10:16:03 -0600 Subject: [Matplotlib-users] xtick label offsets Message-ID: All: I'm working on offsetting xticks and xtick labels that are calculated and set by a function. In some cases the positions of the calculated xticks overlap (such as in the attached png) and I want to space them apart instead of making them visible by rotating the label text. I've tried adding an additional tick mark and setting the label of the additional tick mark to be the value I want, and set the labels of the overlapping tick marks to be blank text. This gets the labels where I want them but then I can't get rid of the extra tickmarks introduced. I've looked through the online documentation for Tick and XTick instances and can't find a command that affects only the tickmark, and doesn't make both the tickmark and the label disappear. Is there a way to make a single tickmark go away and keep its label visible? Alternatively is there a way to adjust the x position of xtick labels by a certain amount using something like texts set_x() function? If anyone more familiar with text and tick properties knows a way to do this then please let me know! Otherwise I will look into using figure annotations to brute force it to look the way I want it to. ?Thanks!? Matthew Bradley -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: figure_8_reproduced.png Type: image/png Size: 311923 bytes Desc: not available URL: From jklymak at uvic.ca Mon Jul 16 12:48:36 2018 From: jklymak at uvic.ca (Jody Klymak) Date: Mon, 16 Jul 2018 09:48:36 -0700 Subject: [Matplotlib-users] xtick label offsets In-Reply-To: References: Message-ID: <241C712C-B159-47B0-89B6-437577A37B95@uvic.ca> Hi Matthew, I?d just use `ax.text` for this. If you are fussy about the y-position of the labels then you can fetch the y-coordinate of one of the x-ticks. Cheers, Jody > On 16 Jul 2018, at 09:16, Matthew Bradley wrote: > > All: > > I'm working on offsetting xticks and xtick labels that are calculated and set by a function. In some cases the positions of the calculated xticks overlap (such as in the attached png) and I want to space them apart instead of making them visible by rotating the label text. I've tried adding an additional tick mark and setting the label of the additional tick mark to be the value I want, and set the labels of the overlapping tick marks to be blank text. This gets the labels where I want them but then I can't get rid of the extra tickmarks introduced. I've looked through the online documentation for Tick and XTick instances and can't find a command that affects only the tickmark, and doesn't make both the tickmark and the label disappear. > > Is there a way to make a single tickmark go away and keep its label visible? > > Alternatively is there a way to adjust the x position of xtick labels by a certain amount using something like texts set_x() function? > > If anyone more familiar with text and tick properties knows a way to do this then please let me know! Otherwise I will look into using figure annotations to brute force it to look the way I want it to. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.hitt at gmail.com Tue Jul 17 00:41:39 2018 From: dan.hitt at gmail.com (Dan Hitt) Date: Mon, 16 Jul 2018 21:41:39 -0700 Subject: [Matplotlib-users] getting access to the TextBox widget in matplotlib 2.2.2 Message-ID: matplotlib version 2.2.2 has a TextBox widget (defined in matplotlib.widgets). I would kind of like to use it, as the matplotlib.widgets have a good, convenient interface. On the other hand, my OS is debian stretch, and the matplotlib that comes iwth it is version 2.0.0. So i'm wondering what my options are. I could try to update the OS, to debian buster, which 2.2.2, but that's a very big ordeal. Or i could try to build python from source, in my home directory, and refer to it by a different name, but i suppose i'd also need to build numpy, matplotlib, and any other extras. (The ./configure --help for python 3.7 makes no mention of numpy or matplotlib, so i suppose i would also have to track down sources for these.) Maybe i could do something with pip3, but i'd have to hoke it up somehow so that it would not interfere with the debian pip3. Or maybe there's some form of TextBox which has been backported to matplotlib 2.0.0? Maybe there's something else i could do? TIA for any advice. dan From efiring at hawaii.edu Tue Jul 17 02:45:16 2018 From: efiring at hawaii.edu (Eric Firing) Date: Mon, 16 Jul 2018 20:45:16 -1000 Subject: [Matplotlib-users] getting access to the TextBox widget in matplotlib 2.2.2 In-Reply-To: References: Message-ID: <48d3d9b3-dc6a-40f9-2106-7cbd44dfa0ce@hawaii.edu> Dan, I think you should be able to do a simple "pip3 install matplotlib", which should put it /usr/local. (Or you can use pip3 to install in a subdirectory of your home directory if you prefer.) My top recommendation, though, would be to install miniconda (or Anaconda) in your home directory. That's the easiest way to work with up-to-date python packages. It also makes it easy to have different environments with different versions, so, for example, you can try out a new version of a package without disturbing your main environment. I have found conda environments much easier to work with than those created with virtualenv. Conda provides not just the python packages, but also version-critical non-python libraries that python packages depend on. Eric On 2018/07/16 6:41 PM, Dan Hitt wrote: > matplotlib version 2.2.2 has a TextBox widget (defined in matplotlib.widgets). > > I would kind of like to use it, as the matplotlib.widgets have a good, > convenient interface. > > On the other hand, my OS is debian stretch, and the matplotlib that > comes iwth it is version 2.0.0. > > So i'm wondering what my options are. > > I could try to update the OS, to debian buster, which 2.2.2, but > that's a very big ordeal. > > Or i could try to build python from source, in my home directory, and > refer to it by a different name, but i suppose i'd also need to build > numpy, matplotlib, and any other extras. (The ./configure --help for > python 3.7 makes no mention of numpy or matplotlib, so i suppose i > would also have to track down sources for these.) > > Maybe i could do something with pip3, but i'd have to hoke it up > somehow so that it would not interfere with the debian pip3. > > Or maybe there's some form of TextBox which has been backported to > matplotlib 2.0.0? > > Maybe there's something else i could do? > > TIA for any advice. > > dan > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > From mbatr27 at gmail.com Tue Jul 17 14:44:39 2018 From: mbatr27 at gmail.com (Matthew Bradley) Date: Tue, 17 Jul 2018 12:44:39 -0600 Subject: [Matplotlib-users] custom fonts in matplotlib graphs Message-ID: Hi all: I?ve added a courier.ttf file to my font library and included the font in the matplotlibrc file in my site packages and rebuilt the cache file. I still get an error message that the font can?t be found and I can?t find any system or matplotlib cache files using the finder to delete them. Have any of you encountered this problem? How can I get matplotlib to recognize my new font. System information: Matplotlib 2.2.02 Mac OS El Capitan Python 3.6 And I have the .ttf file in both my system font library and in the matplotlib font library Thanks! -- Matthew Bradley -------------- next part -------------- An HTML attachment was scrubbed... URL: From diego.avesani at gmail.com Tue Jul 17 15:19:56 2018 From: diego.avesani at gmail.com (Diego Avesani) Date: Tue, 17 Jul 2018 21:19:56 +0200 Subject: [Matplotlib-users] read file with date and plot it In-Reply-To: <49AE932D-DCFB-4010-9053-CB381D9756D7@icloud.com> References: <1531668621550-0.post@n5.nabble.com> <49AE932D-DCFB-4010-9053-CB381D9756D7@icloud.com> Message-ID: Dear scott, Let's me try. I'll write back as soon as possible, Diego On 15 July 2018 at 21:56, Scott Lasley wrote: > Are you using the names parameter in read_csv to set the header names? > This works for me > > headers = ['date','dato1','dato2','dato3'] > df = pd.read_csv('./'+folder+'/'+fname, header=None, names=headers) > df.plot(x='date',y='dato2',) > > > On Jul 15, 2018, at 11:30, diedro wrote: > > > > Dear all, > > > > I have created with fortran the following file: > > > > / > > 2013:01:02-01,-999.0000, 1.0000000E+00,1.0000000E+00 > > 2013:01:02-02,-999.0000, 2.0000000E+00,0.0000000E+00 > > 2013:01:02-03,-999.0000, 3.0000000E+00,2.0000000E+00 > > 2013:01:02-04,-999.0000, 4.0000000E+00,0.0000000E+00 > > 2013:01:02-05,-999.0000, 5.0000000E+00,3.0000000E+00/ > > .... > > > > I would like to read it and to plot data according to date > > > > so far this is what I do: > > > > /folder = 'meteo_stations' > > fname = 'stations_pp.txt' > > headers = ['date','dato1','dato2','dato3'] > > df = pd.read_csv('./'+folder+'/'+fname,) > > > > df.plot(x='date',y='dato2',)/ > > > > unfortunately, I get an error? > > > > what shall I do? > > > > Thanks for any kind of helps, > > > > Best regards > > > > > > > > > > > > > > > > > > -- > > Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users- > f3.html > > _______________________________________________ > > Matplotlib-users mailing list > > Matplotlib-users at python.org > > https://mail.python.org/mailman/listinfo/matplotlib-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From animatore.trps03000x at didasca.org Wed Jul 18 02:34:59 2018 From: animatore.trps03000x at didasca.org (Animatore. TRPS03000X) Date: Wed, 18 Jul 2018 08:34:59 +0200 Subject: [Matplotlib-users] Ubuntu 18 animation and Qt5Agg Message-ID: Hi! My name is Marco, I am a math and pyhs teacher in an High School in Terni (130 km far from Rome). In 2015, I and my students made an Open Physics Lab using open hardware (Arduino, sensors) and Open software (Ubuntu 14, MatPlotLib and GeoGebra etc.). You can watch the Laboratory working with distance sensor if you play this video https://www.youtube.com/watch? v=fuEjOx7tkwU. In 2016 we had a problem with Ubuntu 16 LTS, MatPlotLib did not work as well as before: the window and the graph were ok but, finished plotting, the graph was not shown after zooming (like a loss of data). We solved doing the steps that you can read at the link below: http://marcocalvaniatm. altervista.org/blog/wp-content/uploads/2017/12/open_phys.pdf. Now with Ubuntu 18 LTS the problem came up again: the buttons work but no graph is shown after zooming or go back, the save button is ok. The solution that we found before is not working now and we do not know what to do. Can anybody help us? Thanks a bunch for your time spent and your attention Marco Calvani -------------- next part -------------- An HTML attachment was scrubbed... URL: From gatti.flpp at gmail.com Wed Jul 18 23:34:38 2018 From: gatti.flpp at gmail.com (FIL_LTP89) Date: Wed, 18 Jul 2018 20:34:38 -0700 (MST) Subject: [Matplotlib-users] Eclipse PyDev rcParams Message-ID: <1531971278872-0.post@n5.nabble.com> I am currently developing a code by exploiting Eclipse PyDev.Whenever I run the code in Debug mode, I get the following error:backend = matplotlib.rcParams['backend']AttributeError: 'module' object has no attribute 'rcParams'I got matplotlib version 1.4.3, and the code features the following lines:import matplotlib as mplmpl.use("Qt4Agg")from mpl_toolkits.basemap import Basemapimport matplotlib.pyplot as pltimport matplotlib.cm as cmimport matplotlib.colors as colorsfrom matplotlib.mlab import griddataFinally, I use PyQt4 as QtThreads and I connected a console to the debug session and enabled GUI event loop integration with pyside/qt4.Any clue on how to solve this isse?ThanksFilippo -- Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From gopisiva1616 at gmail.com Thu Jul 19 10:32:46 2018 From: gopisiva1616 at gmail.com (Gopi1616) Date: Thu, 19 Jul 2018 07:32:46 -0700 (MST) Subject: [Matplotlib-users] Matplotlib - why scatter plot markers are stretched? Message-ID: <1532010766419-0.post@n5.nabble.com> I was creating scatter plot using matplotlib with python2.7 script and it worked totally fine. I then upgraded my python script from python2.7 to 3.6 now and the markers in the plot are stretched, not sure why this is happening. Please help me with this. Data: table1.index freq_table1['VarFreq'] 1 0.2 2 0.4 3 0.7 4 1.0 Code: fig = plt.figure(figsize=(20,16)) ax1 = fig.add_subplot(1,1,1) ax1.scatter(table1.index, table1['VarFreq'], color='r', label=VCF1_legend, marker="*") ax1.scatter(table2.index, table2['VarFreq'], color='blue', label=VCF2_legend, marker="+") plt.legend(loc='upper right') ax1.set_title('VarFreq correlation, fontsize=20) plt.savefig('WESPP_frequency_comparison.png', dpi=600 ) -- Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html From tcaswell at gmail.com Thu Jul 19 16:56:05 2018 From: tcaswell at gmail.com (Thomas Caswell) Date: Thu, 19 Jul 2018 16:56:05 -0400 Subject: [Matplotlib-users] Matplotlib - why scatter plot markers are stretched? In-Reply-To: <1532010766419-0.post@n5.nabble.com> References: <1532010766419-0.post@n5.nabble.com> Message-ID: What is the data type of the the index? Can you give us a copy-pasteble example (if we change your example to fill in the missing variables we may miss a key detail and not be able to reproduce the issue). Generating random data is usually a good approach here. On Thu, Jul 19, 2018 at 10:33 AM Gopi1616 wrote: > I was creating scatter plot using matplotlib with python2.7 script and it > worked totally fine. I then upgraded my python script from python2.7 to 3.6 > now and the markers in the plot are stretched, not sure why this is > happening. Please help me with this. > > > Data: > table1.index freq_table1['VarFreq'] > 1 0.2 > 2 0.4 > 3 0.7 > 4 1.0 > > Code: > fig = plt.figure(figsize=(20,16)) > ax1 = fig.add_subplot(1,1,1) > ax1.scatter(table1.index, table1['VarFreq'], color='r', > label=VCF1_legend, > marker="*") > ax1.scatter(table2.index, table2['VarFreq'], color='blue', > label=VCF2_legend, marker="+") > plt.legend(loc='upper right') > ax1.set_title('VarFreq correlation, fontsize=20) > plt.savefig('WESPP_frequency_comparison.png', dpi=600 ) > > > > -- > Sent from: > http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > -- Thomas Caswell tcaswell at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tcaswell at gmail.com Thu Jul 19 16:58:14 2018 From: tcaswell at gmail.com (Thomas Caswell) Date: Thu, 19 Jul 2018 16:58:14 -0400 Subject: [Matplotlib-users] Ubuntu 18 animation and Qt5Agg In-Reply-To: References: Message-ID: Sorry this broke. What Matplotlib versions are you changing between? Do you have a minimal example that reproduces the bug / change of behavior? Tom On Wed, Jul 18, 2018 at 2:35 AM Animatore. TRPS03000X < animatore.trps03000x at didasca.org> wrote: > Hi! > > My name is Marco, I am a math and pyhs teacher in an High School in Terni > (130 km far from Rome). In 2015, I and my students made an Open Physics Lab > using open hardware (Arduino, sensors) and Open software (Ubuntu 14, > MatPlotLib and GeoGebra etc.). You can watch the Laboratory working with > distance sensor if you play this video > https://www.youtube.com/watch?v=fuEjOx7tkwU. > > In 2016 we had a problem with Ubuntu 16 LTS, MatPlotLib did not work as > well as before: the window and the graph were ok but, finished plotting, > the graph was not shown after zooming (like a loss of data). We solved > doing the steps that you can read at the link below: > http://marcocalvaniatm.altervista.org/blog/wp-content/uploads/2017/12/open_phys.pdf > . > > Now with Ubuntu 18 LTS the problem came up again: the buttons work but no > graph is shown after zooming or go back, the save button is ok. The > solution that we found before is not working now and we do not know what to > do. > > Can anybody help us? > Thanks a bunch for your time spent and your attention > Marco Calvani > > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > -- Thomas Caswell tcaswell at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tcaswell at gmail.com Thu Jul 19 16:59:48 2018 From: tcaswell at gmail.com (Thomas Caswell) Date: Thu, 19 Jul 2018 16:59:48 -0400 Subject: [Matplotlib-users] custom fonts in matplotlib graphs In-Reply-To: References: Message-ID: The font cache is in `~/.cache/matplotlib` How are you specifying the font to be used? Tom On Tue, Jul 17, 2018 at 2:45 PM Matthew Bradley wrote: > Hi all: > > I?ve added a courier.ttf file to my font library and included the font in > the matplotlibrc file in my site packages and rebuilt the cache file. I > still get an error message that the font can?t be found and I can?t find > any system or matplotlib cache files using the finder to delete them. Have > any of you encountered this problem? How can I get matplotlib to recognize > my new font. > > System information: > Matplotlib 2.2.02 > Mac OS El Capitan > Python 3.6 > And I have the .ttf file in both my system font library and in the > matplotlib font library > > > Thanks! > > -- > Matthew Bradley > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > -- Thomas Caswell tcaswell at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From animatore.trps03000x at didasca.org Fri Jul 20 16:25:51 2018 From: animatore.trps03000x at didasca.org (Animatore. TRPS03000X) Date: Fri, 20 Jul 2018 22:25:51 +0200 Subject: [Matplotlib-users] Matplotlib-users Digest, Vol 36, Issue 7 In-Reply-To: References: Message-ID: Hello Tom! Thanks for your attention. I have installed Matplotlib with the repositories of Ubuntu. I solved the problem of Ubuntu 16 reinstalling MatPlotLib v.*1.4.3* (downgrading?) token from the following link https://sourceforge.net/projec ts/matplotlib/files/matplotlib/matplotlib-1.4.3/ With Ubuntu 18 the previous solution does not work and the version of MatPlotLib remains v. *2.1.1*. I have attached the file that I use for the graph with the motion sensor. Thank you for your help in this matter, Marco 2018-07-18 18:00 GMT+02:00 : > Send Matplotlib-users mailing list submissions to > matplotlib-users at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/matplotlib-users > or, via email, send a message with subject or body 'help' to > matplotlib-users-request at python.org > > You can reach the person managing the list at > matplotlib-users-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Matplotlib-users digest..." > > > Today's Topics: > > 1. custom fonts in matplotlib graphs (Matthew Bradley) > 2. Re: read file with date and plot it (Diego Avesani) > 3. Ubuntu 18 animation and Qt5Agg (Animatore. TRPS03000X) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 17 Jul 2018 12:44:39 -0600 > From: Matthew Bradley > To: matplotlib-users at python.org > Subject: [Matplotlib-users] custom fonts in matplotlib graphs > Message-ID: > gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi all: > > I?ve added a courier.ttf file to my font library and included the font in > the matplotlibrc file in my site packages and rebuilt the cache file. I > still get an error message that the font can?t be found and I can?t find > any system or matplotlib cache files using the finder to delete them. Have > any of you encountered this problem? How can I get matplotlib to recognize > my new font. > > System information: > Matplotlib 2.2.02 > Mac OS El Capitan > Python 3.6 > And I have the .ttf file in both my system font library and in the > matplotlib font library > > > Thanks! > > -- > Matthew Bradley > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: attachments/20180717/02836858/attachment-0001.html> > > ------------------------------ > > Message: 2 > Date: Tue, 17 Jul 2018 21:19:56 +0200 > From: Diego Avesani > To: matplotlib-users at python.org > Subject: Re: [Matplotlib-users] read file with date and plot it > Message-ID: > gmail.com> > Content-Type: text/plain; charset="utf-8" > > Dear scott, > > Let's me try. I'll write back as soon as possible, > > Diego > > > On 15 July 2018 at 21:56, Scott Lasley wrote: > > > Are you using the names parameter in read_csv to set the header names? > > This works for me > > > > headers = ['date','dato1','dato2','dato3'] > > df = pd.read_csv('./'+folder+'/'+fname, header=None, names=headers) > > df.plot(x='date',y='dato2',) > > > > > On Jul 15, 2018, at 11:30, diedro wrote: > > > > > > Dear all, > > > > > > I have created with fortran the following file: > > > > > > / > > > 2013:01:02-01,-999.0000, 1.0000000E+00,1.0000000E+00 > > > 2013:01:02-02,-999.0000, 2.0000000E+00,0.0000000E+00 > > > 2013:01:02-03,-999.0000, 3.0000000E+00,2.0000000E+00 > > > 2013:01:02-04,-999.0000, 4.0000000E+00,0.0000000E+00 > > > 2013:01:02-05,-999.0000, 5.0000000E+00,3.0000000E+00/ > > > .... > > > > > > I would like to read it and to plot data according to date > > > > > > so far this is what I do: > > > > > > /folder = 'meteo_stations' > > > fname = 'stations_pp.txt' > > > headers = ['date','dato1','dato2','dato3'] > > > df = pd.read_csv('./'+folder+'/'+fname,) > > > > > > df.plot(x='date',y='dato2',)/ > > > > > > unfortunately, I get an error? > > > > > > what shall I do? > > > > > > Thanks for any kind of helps, > > > > > > Best regards > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users- > > f3.html > > > _______________________________________________ > > > Matplotlib-users mailing list > > > Matplotlib-users at python.org > > > https://mail.python.org/mailman/listinfo/matplotlib-users > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: attachments/20180717/a67fcd41/attachment-0001.html> > > ------------------------------ > > Message: 3 > Date: Wed, 18 Jul 2018 08:34:59 +0200 > From: "Animatore. TRPS03000X" > To: matplotlib-users at python.org > Subject: [Matplotlib-users] Ubuntu 18 animation and Qt5Agg > Message-ID: > gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi! > > My name is Marco, I am a math and pyhs teacher in an High School in Terni > (130 km far from Rome). In 2015, I and my students made an Open Physics Lab > using open hardware (Arduino, sensors) and Open software (Ubuntu 14, > MatPlotLib and GeoGebra etc.). You can watch the Laboratory working with > distance sensor if you play this video https://www.youtube.com/watch? > v=fuEjOx7tkwU. > > In 2016 we had a problem with Ubuntu 16 LTS, MatPlotLib did not work as > well as before: the window and the graph were ok but, finished plotting, > the graph was not shown after zooming (like a loss of data). We solved > doing the steps that you can read at the link below: > http://marcocalvaniatm. > altervista.org/blog/wp-content/uploads/2017/12/open_phys.pdf. > > Now with Ubuntu 18 LTS the problem came up again: the buttons work but no > graph is shown after zooming or go back, the save button is ok. The > solution that we found before is not working now and we do not know what to > do. > > Can anybody help us? > Thanks a bunch for your time spent and your attention > Marco Calvani > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: attachments/20180718/7dcd41c4/attachment-0001.html> > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > > > ------------------------------ > > End of Matplotlib-users Digest, Vol 36, Issue 7 > *********************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From animatore.trps03000x at didasca.org Sun Jul 22 04:57:41 2018 From: animatore.trps03000x at didasca.org (Animatore. TRPS03000X) Date: Sun, 22 Jul 2018 10:57:41 +0200 Subject: [Matplotlib-users] Matplotlib-users Digest, Vol 36, Issue 10 In-Reply-To: References: Message-ID: Forgive me! I had not attacched the file. I am newiebie of the list Bste regards Marco 2018-07-21 18:00 GMT+02:00 : > Send Matplotlib-users mailing list submissions to > matplotlib-users at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/matplotlib-users > or, via email, send a message with subject or body 'help' to > matplotlib-users-request at python.org > > You can reach the person managing the list at > matplotlib-users-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Matplotlib-users digest..." > > > Today's Topics: > > 1. Re: Matplotlib-users Digest, Vol 36, Issue 7 > (Animatore. TRPS03000X) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 20 Jul 2018 22:25:51 +0200 > From: "Animatore. TRPS03000X" > To: matplotlib-users at python.org > Subject: Re: [Matplotlib-users] Matplotlib-users Digest, Vol 36, Issue > 7 > Message-ID: > mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hello Tom! > > Thanks for your attention. I have installed Matplotlib with the > repositories of Ubuntu. > > > I solved the problem of Ubuntu 16 reinstalling MatPlotLib v.*1.4.3* > (downgrading?) token from the following link > https://sourceforge.net/projec > ts/matplotlib/files/matplotlib/matplotlib-1.4.3/ > > > With Ubuntu 18 the previous solution does not work and the version of > MatPlotLib remains v. *2.1.1*. > > > I have attached the file that I use for the graph with the motion sensor. > > > Thank you for your help in this matter, > > Marco > > > 2018-07-18 18:00 GMT+02:00 : > > > Send Matplotlib-users mailing list submissions to > > matplotlib-users at python.org > > > > To subscribe or unsubscribe via the World Wide Web, visit > > https://mail.python.org/mailman/listinfo/matplotlib-users > > or, via email, send a message with subject or body 'help' to > > matplotlib-users-request at python.org > > > > You can reach the person managing the list at > > matplotlib-users-owner at python.org > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of Matplotlib-users digest..." > > > > > > Today's Topics: > > > > 1. custom fonts in matplotlib graphs (Matthew Bradley) > > 2. Re: read file with date and plot it (Diego Avesani) > > 3. Ubuntu 18 animation and Qt5Agg (Animatore. TRPS03000X) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Tue, 17 Jul 2018 12:44:39 -0600 > > From: Matthew Bradley > > To: matplotlib-users at python.org > > Subject: [Matplotlib-users] custom fonts in matplotlib graphs > > Message-ID: > > > gmail.com> > > Content-Type: text/plain; charset="utf-8" > > > > Hi all: > > > > I?ve added a courier.ttf file to my font library and included the font in > > the matplotlibrc file in my site packages and rebuilt the cache file. I > > still get an error message that the font can?t be found and I can?t find > > any system or matplotlib cache files using the finder to delete them. > Have > > any of you encountered this problem? How can I get matplotlib to > recognize > > my new font. > > > > System information: > > Matplotlib 2.2.02 > > Mac OS El Capitan > > Python 3.6 > > And I have the .ttf file in both my system font library and in the > > matplotlib font library > > > > > > Thanks! > > > > -- > > Matthew Bradley > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > attachments/20180717/02836858/attachment-0001.html> > > > > ------------------------------ > > > > Message: 2 > > Date: Tue, 17 Jul 2018 21:19:56 +0200 > > From: Diego Avesani > > To: matplotlib-users at python.org > > Subject: Re: [Matplotlib-users] read file with date and plot it > > Message-ID: > > > gmail.com> > > Content-Type: text/plain; charset="utf-8" > > > > Dear scott, > > > > Let's me try. I'll write back as soon as possible, > > > > Diego > > > > > > On 15 July 2018 at 21:56, Scott Lasley wrote: > > > > > Are you using the names parameter in read_csv to set the header names? > > > This works for me > > > > > > headers = ['date','dato1','dato2','dato3'] > > > df = pd.read_csv('./'+folder+'/'+fname, header=None, names=headers) > > > df.plot(x='date',y='dato2',) > > > > > > > On Jul 15, 2018, at 11:30, diedro wrote: > > > > > > > > Dear all, > > > > > > > > I have created with fortran the following file: > > > > > > > > / > > > > 2013:01:02-01,-999.0000, 1.0000000E+00,1.0000000E+00 > > > > 2013:01:02-02,-999.0000, 2.0000000E+00,0.0000000E+00 > > > > 2013:01:02-03,-999.0000, 3.0000000E+00,2.0000000E+00 > > > > 2013:01:02-04,-999.0000, 4.0000000E+00,0.0000000E+00 > > > > 2013:01:02-05,-999.0000, 5.0000000E+00,3.0000000E+00/ > > > > .... > > > > > > > > I would like to read it and to plot data according to date > > > > > > > > so far this is what I do: > > > > > > > > /folder = 'meteo_stations' > > > > fname = 'stations_pp.txt' > > > > headers = ['date','dato1','dato2','dato3'] > > > > df = pd.read_csv('./'+folder+'/'+fname,) > > > > > > > > df.plot(x='date',y='dato2',)/ > > > > > > > > unfortunately, I get an error? > > > > > > > > what shall I do? > > > > > > > > Thanks for any kind of helps, > > > > > > > > Best regards > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users- > > > f3.html > > > > _______________________________________________ > > > > Matplotlib-users mailing list > > > > Matplotlib-users at python.org > > > > https://mail.python.org/mailman/listinfo/matplotlib-users > > > > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > attachments/20180717/a67fcd41/attachment-0001.html> > > > > ------------------------------ > > > > Message: 3 > > Date: Wed, 18 Jul 2018 08:34:59 +0200 > > From: "Animatore. TRPS03000X" > > To: matplotlib-users at python.org > > Subject: [Matplotlib-users] Ubuntu 18 animation and Qt5Agg > > Message-ID: > > > gmail.com> > > Content-Type: text/plain; charset="utf-8" > > > > Hi! > > > > My name is Marco, I am a math and pyhs teacher in an High School in Terni > > (130 km far from Rome). In 2015, I and my students made an Open Physics > Lab > > using open hardware (Arduino, sensors) and Open software (Ubuntu 14, > > MatPlotLib and GeoGebra etc.). You can watch the Laboratory working with > > distance sensor if you play this video https://www.youtube.com/watch? > > v=fuEjOx7tkwU. > > > > In 2016 we had a problem with Ubuntu 16 LTS, MatPlotLib did not work as > > well as before: the window and the graph were ok but, finished plotting, > > the graph was not shown after zooming (like a loss of data). We solved > > doing the steps that you can read at the link below: > > http://marcocalvaniatm. > > altervista.org/blog/wp-content/uploads/2017/12/open_phys.pdf. > > > > Now with Ubuntu 18 LTS the problem came up again: the buttons work but no > > graph is shown after zooming or go back, the save button is ok. The > > solution that we found before is not working now and we do not know what > to > > do. > > > > Can anybody help us? > > Thanks a bunch for your time spent and your attention > > Marco Calvani > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > attachments/20180718/7dcd41c4/attachment-0001.html> > > > > ------------------------------ > > > > Subject: Digest Footer > > > > _______________________________________________ > > Matplotlib-users mailing list > > Matplotlib-users at python.org > > https://mail.python.org/mailman/listinfo/matplotlib-users > > > > > > ------------------------------ > > > > End of Matplotlib-users Digest, Vol 36, Issue 7 > > *********************************************** > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: attachments/20180720/bb97f70d/attachment-0001.html> > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > > > ------------------------------ > > End of Matplotlib-users Digest, Vol 36, Issue 10 > ************************************************ > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: grafmar1.py Type: text/x-python Size: 1271 bytes Desc: not available URL: From anntzer.lee at gmail.com Sun Jul 22 16:52:22 2018 From: anntzer.lee at gmail.com (Antony Lee) Date: Sun, 22 Jul 2018 22:52:22 +0200 Subject: [Matplotlib-users] mplcairo 0.1 release Message-ID: Dear all, I am pleased to announce the release of mplcairo 0.1 # Description mplcairo is a Matplotlib backend based on the well-known cairo library, supporting output to both raster (including interactively) and vector formats. In other words, it provides the functionality of Matplotlib's {,qt5,gtk3,wx,tk,macos}{agg,cairo}, pdf, ps, and svg backends. Per Matplotlib's standard API, the backend can be selected by calling matplotlib.use("module://mplcairo.qt") or setting your MPLBACKEND environment variable to `module://mplcairo.qt` for Qt5, and similarly for other toolkits. The source tarball, and Py3.6 manylinux and Windows wheels, are available on PyPI (I am looking for help to generate the OSX wheels). See the README for more details. # Why a new backend? Compared to Matplotlib's builtin Agg and cairo backends, mplcairo presents the following features: - Improved accuracy (e.g., with marker positioning, quad meshes, and text kerning). - Support for a wider variety of font formats, such as otf and pfb, for vector (PDF, PS, SVG) backends (Matplotlib's Agg backend also supports such fonts). - Optional support for complex text layout (right-to-left languages, etc.) using Raqm. **Note** that Raqm depends on Fribidi, which is licensed under the LGPLv2.1+. - Support for embedding URLs in PDF (but not SVG) output (requires cairo?1.15.4). - Support for multi-page output both for PDF and PS (Matplotlib only supports multi-page PDF). - Support for custom blend modes (see `examples/operators.py`). See the README for more details. # Changelog from mplcairo 0.1a1 to mplcairo 0.1 - Integration with libraqm now occurs via dlopen() rather than being selected at compile-time. - Various rendering and performance improvements. - On Travis, we now run Matplotlib's test suite with mplcairo patching the default Agg renderer. Enjoy, Antony Lee -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilikeorangeapple at gmail.com Mon Jul 23 03:11:43 2018 From: ilikeorangeapple at gmail.com (orange si) Date: Mon, 23 Jul 2018 15:11:43 +0800 Subject: [Matplotlib-users] add round corner for patches.Rectangle, not with FancyBboxPatch Message-ID: hi everyone, I see the FancyBboxPatch can add round corner in https://matplotlib.org/gallery/shapes_and_collections/fancybox_demo.html , but that has some space between the rectangle and the fancybox. And I just want to add round corner instead of the sharp corner for Rectangle, not to expand the rectangle region. That confused me a few days, thanks for any help~ Best Regards Si -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.v.root at gmail.com Mon Jul 23 13:44:14 2018 From: ben.v.root at gmail.com (Benjamin Root) Date: Mon, 23 Jul 2018 13:44:14 -0400 Subject: [Matplotlib-users] [Matplotlib-devel] mplcairo 0.1 release In-Reply-To: References: Message-ID: Congratulations to Antony for his hard work on this important backend! As far as I am concerned, the cairo backend is the future of matplotlib. Test this backend out for yourselves and help us take matplotlib to the next level in high-quality charting! Cheers! Ben Root On Sun, Jul 22, 2018 at 4:52 PM, Antony Lee wrote: > Dear all, > > I am pleased to announce the release of mplcairo 0.1 > > # Description > > mplcairo is a Matplotlib backend based on the well-known cairo library, > supporting output to both raster (including interactively) and vector > formats. In other words, it provides the functionality of Matplotlib's > {,qt5,gtk3,wx,tk,macos}{agg,cairo}, pdf, ps, and svg backends. > > Per Matplotlib's standard API, the backend can be selected by calling > > matplotlib.use("module://mplcairo.qt") > > or setting your MPLBACKEND environment variable to `module://mplcairo.qt` > for > Qt5, and similarly for other toolkits. > > The source tarball, and Py3.6 manylinux and Windows wheels, are available > on > PyPI (I am looking for help to generate the OSX wheels). > > See the README for more details. > > # Why a new backend? > > Compared to Matplotlib's builtin Agg and cairo backends, mplcairo presents > the > following features: > > - Improved accuracy (e.g., with marker positioning, quad meshes, and text > kerning). > - Support for a wider variety of font formats, such as otf and pfb, for > vector > (PDF, PS, SVG) backends (Matplotlib's Agg backend also supports such > fonts). > - Optional support for complex text layout (right-to-left languages, etc.) > using Raqm. **Note** that Raqm depends on Fribidi, which is licensed > under > the LGPLv2.1+. > - Support for embedding URLs in PDF (but not SVG) output (requires > cairo?1.15.4). > - Support for multi-page output both for PDF and PS (Matplotlib only > supports > multi-page PDF). > - Support for custom blend modes (see `examples/operators.py`). > > See the README for more details. > > # Changelog from mplcairo 0.1a1 to mplcairo 0.1 > > - Integration with libraqm now occurs via dlopen() rather than being > selected > at compile-time. > - Various rendering and performance improvements. > - On Travis, we now run Matplotlib's test suite with mplcairo patching the > default Agg renderer. > > Enjoy, > > Antony Lee > > _______________________________________________ > Matplotlib-devel mailing list > Matplotlib-devel at python.org > https://mail.python.org/mailman/listinfo/matplotlib-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilikeorangeapple at gmail.com Wed Jul 25 02:13:10 2018 From: ilikeorangeapple at gmail.com (orange si) Date: Wed, 25 Jul 2018 14:13:10 +0800 Subject: [Matplotlib-users] add round corner for patches.Rectangle, not with FancyBboxPatch In-Reply-To: References: Message-ID: update: I use round,pad=1,rounding_size=0.4, it works well in demo script ! But when I use that in my real script, that don't work, even I use set_boxstyle("round,pad=1,rounding_size=0.4"), it also not woks. Aattachment is my script and ipynb and input file. thanks~ orange si ?2018?7?23??? ??3:11??? > hi everyone, > I see the FancyBboxPatch can add round corner in > https://matplotlib.org/gallery/shapes_and_collections/fancybox_demo.html > , but that has some space between the rectangle and the fancybox. And I > just want to add round corner instead of the sharp corner for Rectangle, > not to expand the rectangle region. > That confused me a few days, thanks for any help~ > > Best Regards > Si > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Untitled.py Type: application/octet-stream Size: 9235 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Untitled.ipynb Type: application/octet-stream Size: 76467 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: input.gff Type: application/octet-stream Size: 3058 bytes Desc: not available URL: From ben.v.root at gmail.com Wed Jul 25 09:32:44 2018 From: ben.v.root at gmail.com (Benjamin Root) Date: Wed, 25 Jul 2018 09:32:44 -0400 Subject: [Matplotlib-users] add round corner for patches.Rectangle, not with FancyBboxPatch In-Reply-To: References: Message-ID: I wonder if specifying the join_style or cap_style for rounded corners might help? https://matplotlib.org/examples/api/joinstyle.html Never tried it before for patches, though. Cheers! Ben Root On Wed, Jul 25, 2018 at 2:13 AM, orange si wrote: > update: I use round,pad=1,rounding_size=0.4, it works well in demo > script ! But when I use that in my real script, that don't work, even I use > set_boxstyle("round,pad=1,rounding_size=0.4"), it also not woks. > Aattachment is my script and ipynb and input file. > > thanks~ > > orange si ?2018?7?23??? ??3:11??? > >> hi everyone, >> I see the FancyBboxPatch can add round corner in >> https://matplotlib.org/gallery/shapes_and_collections/fancybox_demo.html >> , but that has some space between the rectangle and the fancybox. And I >> just want to add round corner instead of the sharp corner for Rectangle, >> not to expand the rectangle region. >> That confused me a few days, thanks for any help~ >> >> Best Regards >> Si >> > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilikeorangeapple at gmail.com Wed Jul 25 10:15:15 2018 From: ilikeorangeapple at gmail.com (orange si) Date: Wed, 25 Jul 2018 22:15:15 +0800 Subject: [Matplotlib-users] add round corner for patches.Rectangle, not with FancyBboxPatch In-Reply-To: References: Message-ID: I tried this: p2 = FancyBboxPatch((fp_x, fp_y), fp_width, fp_height,fc=fp_color,ec="black", linewidth=0.3, boxstyle='round,pad=0,rounding_size=0.5', joinstyle="round", capstyle='round') ax.add_patch(p2) but still get a sharp cornor box~ I am confused that why that code work well in demo script, but when in my real script, it didnot work, I think maybe my real script has some error codes which I am missing. Benjamin Root ?2018?7?25??? ??9:33??? > I wonder if specifying the join_style or cap_style for rounded corners > might help? > > https://matplotlib.org/examples/api/joinstyle.html > > Never tried it before for patches, though. > > Cheers! > Ben Root > > > On Wed, Jul 25, 2018 at 2:13 AM, orange si > wrote: > >> update: I use round,pad=1,rounding_size=0.4, it works well in demo >> script ! But when I use that in my real script, that don't work, even I use >> set_boxstyle("round,pad=1,rounding_size=0.4"), it also not woks. >> Aattachment is my script and ipynb and input file. >> >> thanks~ >> >> orange si ?2018?7?23??? ??3:11??? >> >>> hi everyone, >>> I see the FancyBboxPatch can add round corner in >>> https://matplotlib.org/gallery/shapes_and_collections/fancybox_demo.html >>> , but that has some space between the rectangle and the fancybox. And I >>> just want to add round corner instead of the sharp corner for Rectangle, >>> not to expand the rectangle region. >>> That confused me a few days, thanks for any help~ >>> >>> Best Regards >>> Si >>> >> >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users at python.org >> https://mail.python.org/mailman/listinfo/matplotlib-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilikeorangeapple at gmail.com Thu Jul 26 02:14:09 2018 From: ilikeorangeapple at gmail.com (orange si) Date: Thu, 26 Jul 2018 14:14:09 +0800 Subject: [Matplotlib-users] add round corner for patches.Rectangle, not with FancyBboxPatch In-Reply-To: References: Message-ID: my mistake~ I didn't realisze the true meaning of rounding_size, I just increase it to 100, it works! beacuse the xlimit is about 10000, so the raw rounding_size=0.2 didn't work well. I close this issue, thanks all for my stupid qustion~ orange si ?2018?7?25??? ??10:15??? > I tried this: > p2 = FancyBboxPatch((fp_x, fp_y), fp_width, > fp_height,fc=fp_color,ec="black", linewidth=0.3, > boxstyle='round,pad=0,rounding_size=0.5', joinstyle="round", > capstyle='round') > ax.add_patch(p2) > but still get a sharp cornor box~ > I am confused that why that code work well in demo script, but when in my > real script, it didnot work, I think maybe my real script has some error > codes which I am missing. > > > Benjamin Root ?2018?7?25??? ??9:33??? > >> I wonder if specifying the join_style or cap_style for rounded corners >> might help? >> >> https://matplotlib.org/examples/api/joinstyle.html >> >> Never tried it before for patches, though. >> >> Cheers! >> Ben Root >> >> >> On Wed, Jul 25, 2018 at 2:13 AM, orange si >> wrote: >> >>> update: I use round,pad=1,rounding_size=0.4, it works well in demo >>> script ! But when I use that in my real script, that don't work, even I use >>> set_boxstyle("round,pad=1,rounding_size=0.4"), it also not woks. >>> Aattachment is my script and ipynb and input file. >>> >>> thanks~ >>> >>> orange si ?2018?7?23??? ??3:11??? >>> >>>> hi everyone, >>>> I see the FancyBboxPatch can add round corner in >>>> https://matplotlib.org/gallery/shapes_and_collections/fancybox_demo.html >>>> , but that has some space between the rectangle and the fancybox. And I >>>> just want to add round corner instead of the sharp corner for Rectangle, >>>> not to expand the rectangle region. >>>> That confused me a few days, thanks for any help~ >>>> >>>> Best Regards >>>> Si >>>> >>> >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Matplotlib-users at python.org >>> https://mail.python.org/mailman/listinfo/matplotlib-users >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.geier at gmail.com Fri Jul 27 21:22:40 2018 From: matthias.geier at gmail.com (Matthias Geier) Date: Sat, 28 Jul 2018 03:22:40 +0200 Subject: [Matplotlib-users] Un-align animations created with to_jshtml()? Message-ID: Dear list. I love the feature to show animations as HTML with to_jshtml() and I'm using it in Jupyter notebooks, e.g. here: https://splines.readthedocs.io/bezier.html What I don't like, however, is that those animations are always centered, because the HTML template uses this line:
See also https://github.com/matplotlib/matplotlib/blob/c552bdc116ad518d988461a28a2dd43ca342f2ee/lib/matplotlib/_animation_data.py#L151 I've tried to work against this forced center alignment by including this snippet in the notebook: But I'm wondering: is there a better way? There must be a better way! I would like the animations left-aligned because the normal plots are also left-aligned. I'm also wondering: shouldn't the alignment be an optional setting? Furthermore, the "align" attribute of "div" elements is "obsolete" and "deprecated" according to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div Shouldn't the alignment probably be removed completely? If I'm using to_html5_video(), the animation isn't centered either, so this would be actually more consistent. cheers, Matthias From rmay31 at gmail.com Fri Jul 27 22:46:06 2018 From: rmay31 at gmail.com (Ryan May) Date: Fri, 27 Jul 2018 20:46:06 -0600 Subject: [Matplotlib-users] Un-align animations created with to_jshtml()? In-Reply-To: References: Message-ID: On Fri, Jul 27, 2018 at 7:23 PM Matthias Geier wrote: > Dear list. > > I love the feature to show animations as HTML with to_jshtml() and I'm > using it in Jupyter notebooks, e.g. here: > https://splines.readthedocs.io/bezier.html > > What I don't like, however, is that those animations are always > centered, because the HTML template uses this line: > >
> > See also > https://github.com/matplotlib/matplotlib/blob/c552bdc116ad518d988461a28a2dd43ca342f2ee/lib/matplotlib/_animation_data.py#L151 > > I've tried to work against this forced center alignment by including > this snippet in the notebook: > > > > But I'm wondering: is there a better way? > > There must be a better way! > > I would like the animations left-aligned because the normal plots are > also left-aligned. > > I'm also wondering: shouldn't the alignment be an optional setting? > > Furthermore, the "align" attribute of "div" elements is "obsolete" and > "deprecated" according to > https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div > > Shouldn't the alignment probably be removed completely? > > If I'm using to_html5_video(), the animation isn't centered either, so > this would be actually more consistent. > That seems like a convincing argument. Would you open an issue with this in it? https://github.com/matplotlib/matplotlib/issues Ryan -- Ryan May -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.geier at gmail.com Sun Jul 29 10:58:44 2018 From: matthias.geier at gmail.com (Matthias Geier) Date: Sun, 29 Jul 2018 16:58:44 +0200 Subject: [Matplotlib-users] Un-align animations created with to_jshtml()? In-Reply-To: References: Message-ID: On Sat, Jul 28, 2018 at 4:46 AM, Ryan May wrote: > On Fri, Jul 27, 2018 at 7:23 PM Matthias Geier wrote: >> >> Dear list. >> >> I love the feature to show animations as HTML with to_jshtml() and I'm >> using it in Jupyter notebooks, e.g. here: >> https://splines.readthedocs.io/bezier.html >> >> What I don't like, however, is that those animations are always >> centered, because the HTML template uses this line: >> >>
>> >> See also >> https://github.com/matplotlib/matplotlib/blob/c552bdc116ad518d988461a28a2dd43ca342f2ee/lib/matplotlib/_animation_data.py#L151 >> >> I've tried to work against this forced center alignment by including >> this snippet in the notebook: >> >> >> >> But I'm wondering: is there a better way? >> >> There must be a better way! >> >> I would like the animations left-aligned because the normal plots are >> also left-aligned. >> >> I'm also wondering: shouldn't the alignment be an optional setting? >> >> Furthermore, the "align" attribute of "div" elements is "obsolete" and >> "deprecated" according to >> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div >> >> Shouldn't the alignment probably be removed completely? >> >> If I'm using to_html5_video(), the animation isn't centered either, so >> this would be actually more consistent. > > > That seems like a convincing argument. Would you open an issue with this in > it? > > https://github.com/matplotlib/matplotlib/issues Thanks Ryan, I've created this issue: https://github.com/matplotlib/matplotlib/issues/11795 In the meantime, does somebody know a better work-around? I've realized that my work-around uses an experimental CSS feature which isn't available yet in all browsers. Any other ideas? cheers, Matthias > Ryan