From madicken.munk at gmail.com Sun Jun 2 16:47:58 2019 From: madicken.munk at gmail.com (Madicken Munk) Date: Sun, 2 Jun 2019 15:47:58 -0500 Subject: [Matplotlib-users] Only a few days left to submit! -- 2019 John Hunter Excellence in Plotting Contest Message-ID: Hi everybody, There are only a few days left to submit to the 2019 John Hunter Excellence in Plotting Contest! If you're interested in participating, note that you have until June 8th to prepare your submission. In memory of John Hunter, we are pleased to be reviving the SciPy John Hunter Excellence in Plotting Competition for 2019. This open competition aims to highlight the importance of data visualization to scientific progress and showcase the capabilities of open source software. Participants are invited to submit scientific plots to be judged by a panel. The winning entries will be announced and displayed at the conference. John Hunter?s family and NumFocus are graciously sponsoring cash prizes for the winners in the following amounts: - 1st prize: $1000 - 2nd prize: $750 - 3rd prize: $500 - Entries must be submitted by June, 8th to the form at https://goo.gl/forms/cFTB3FUBrMPfQ7Vz1 - Winners will be announced at Scipy 2019 in Austin, TX. - Participants do not need to attend the Scipy conference. - Entries may take the definition of ?visualization? rather broadly. Entries may be, for example, a traditional printed plot, an interactive visualization for the web, or an animation. - Source code for the plot must be provided, in the form of Python code and/or a Jupyter notebook, along with a rendering of the plot in a widely used format. This may be, for example, PDF for print, standalone HTML and Javascript for an interactive plot, or MPEG-4 for a video. If the original data can not be shared for reasons of size or licensing, "fake" data may be substituted, along with an image of the plot using real data. - Each entry must include a 300-500 word abstract describing the plot and its importance for a general scientific audience. - Entries will be judged on their clarity, innovation and aesthetics, but most importantly for their effectiveness in communicating a real-world problem. Entrants are encouraged to submit plots that were used during the course of research or work, rather than merely being hypothetical. - SciPy reserves the right to display any and all entries, whether prize-winning or not, at the conference, use in any materials or on its website, with attribution to the original author(s). SciPy John Hunter Excellence in Plotting Competition Co-Chairs Hannah Aizenman Thomas Caswell Madicken Munk Nelle Varoquaux -------------- next part -------------- An HTML attachment was scrubbed... URL: From anntzer.lee at gmail.com Mon Jun 3 17:50:07 2019 From: anntzer.lee at gmail.com (Antony Lee) Date: Mon, 3 Jun 2019 23:50:07 +0200 Subject: [Matplotlib-users] Looking for OSX and Jupyter notebook experts for integrating a new renderer into Matplotlib Message-ID: Hi all, Some of you may already have heard about mplcairo ( https://github.com/matplotlib/mplcairo), a new backend for Matplotlib I have been developing for the past two years. Briefly, it relies on the cairo library (https://www.cairographics.org/) to generate higher quality images than Matplotlib's current backends, both in raster format (for which Matplotlib currently uses Agg, a library that whose development has stalled) and in vector (PDF, PS, SVG) formats (for which Matplotlib currently uses hand-written backends). (A list of mplcairo's features and differences from Matplotlib's default backends is listed in its README, at https://github.com/matplotlib/mplcairo.) Given mplcairo's features, there is interest in the Matplotlib core developer team to move it into Matplotlib itself, with the ultimate goal to (possibly) make it the default backend. Obviously, there are many steps before this can happen, but, in particular, there are two for which I am looking for help: - Improve the macOS build: Currently, I provide wheels for Linux and Windows, but am unable to provide wheels for macOS. Briefly, this is because mplcairo depends on a C++17-compliant C++ standard library, which is not available on OSX<10.14. On Linux, this is handled by statically linking a recent enough libstdc++ into the wheel, but I have not been able to do so on maxOS (I do not work on that platform...). If anyone knows how to make this work on macOS, their help would be greatly appreciated. - Improve integration with the Jupyter notebook: Currently, Jupyter notebook's Matplotlib integration hard-codes the renderer to use to Agg. At some point, I had tried to make the notebook use mplcairo instead by forcefully overwriting the contents of the Agg backend with the mplcairo backend (ugh), which worked for a while, but things have changed enough on the notebook side (I believe) that this is not working anymore. Probably a more correct solution would be to make the backend actually properly configurable on the notebook's side. Given that I personally hardly ever use the notebook as well, here again help from a notebook expert would be most welcome. Matplotlib brownie points for any helping hands :-) Thanks in advance, Antony Lee -------------- next part -------------- An HTML attachment was scrubbed... URL: From ndbecker2 at gmail.com Thu Jun 6 09:25:27 2019 From: ndbecker2 at gmail.com (Neal Becker) Date: Thu, 06 Jun 2019 09:25:27 -0400 Subject: [Matplotlib-users] please document imshow axes order Message-ID: I just wasted quite a bit of time trying to debug my code. It took a long time because I was using imshow to debug, and didn't know that imshow displays a matrix not using cartesian coordinates. The axes are transposed and one axis is reversed. The documentation doesn't mention this. Thanks, Neal From nathan12343 at gmail.com Thu Jun 6 09:30:39 2019 From: nathan12343 at gmail.com (Nathan Goldbaum) Date: Thu, 6 Jun 2019 09:30:39 -0400 Subject: [Matplotlib-users] please document imshow axes order In-Reply-To: References: Message-ID: This is discussed in the description of the "origin" keyword argument: *origin* : {'upper', 'lower'}, optional Place the [0,0] index of the array in the upper left or lower left corner of the axes. The convention 'upper' is typically used for matrices and images. If not given, rcParams["image.origin"] is used, defaulting to 'upper'. Note that the vertical axes points upward for 'lower' but downward for 'upper'. On Thu, Jun 6, 2019 at 9:25 AM Neal Becker wrote: > I just wasted quite a bit of time trying to debug my code. It took a long > time because I was using imshow to debug, and didn't know that imshow > displays a matrix not using cartesian coordinates. The axes are > transposed > and one axis is reversed. The documentation doesn't mention this. > > Thanks, > Neal > > _______________________________________________ > 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 ndbecker2 at gmail.com Thu Jun 6 09:37:44 2019 From: ndbecker2 at gmail.com (Neal Becker) Date: Thu, 6 Jun 2019 09:37:44 -0400 Subject: [Matplotlib-users] please document imshow axes order In-Reply-To: References: Message-ID: The origin only discusses the inversion of the y axis - in addition the x-y are transposed. On Thu, Jun 6, 2019 at 9:30 AM Nathan Goldbaum wrote: > > This is discussed in the description of the "origin" keyword argument: > > origin : {'upper', 'lower'}, optional > > Place the [0,0] index of the array in the upper left or lower left corner of the axes. The convention 'upper' is typically used for matrices and images. If not given, rcParams["image.origin"] is used, defaulting to 'upper'. > > Note that the vertical axes points upward for 'lower' but downward for 'upper'. > > > On Thu, Jun 6, 2019 at 9:25 AM Neal Becker wrote: >> >> I just wasted quite a bit of time trying to debug my code. It took a long >> time because I was using imshow to debug, and didn't know that imshow >> displays a matrix not using cartesian coordinates. The axes are transposed >> and one axis is reversed. The documentation doesn't mention this. >> >> Thanks, >> Neal >> >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users at python.org >> https://mail.python.org/mailman/listinfo/matplotlib-users -- Those who don't understand recursion are doomed to repeat it From tcaswell at gmail.com Thu Jun 6 09:38:57 2019 From: tcaswell at gmail.com (Thomas Caswell) Date: Thu, 6 Jun 2019 09:38:57 -0400 Subject: [Matplotlib-users] please document imshow axes order In-Reply-To: References: Message-ID: There is also a tutorial addressing the ways that `origin` and `extent` interact with each other: https://matplotlib.org/tutorials/intermediate/imshow_extent.html As for the transpose, that is due to one branch of math teaching use to think (x, y) and different branch of math teaching us to think (row, column). For `imshow` we use the second one which is consistent with how numpy's repr of on array. It would be confusing if the data for `my_array[0, :]` was displayed as the first _column_ of the image. I do not disagree that this is frustrating/confusing, there is a comment in some of my grad school code which is basically "getting the (x,y) vs (r,c) conversions right here took you an afternoon, don't touch this again!" ;) Tom On Thu, Jun 6, 2019 at 9:31 AM Nathan Goldbaum wrote: > This is discussed in the description of the "origin" keyword argument: > > *origin* : {'upper', 'lower'}, optional > > Place the [0,0] index of the array in the upper left or lower left corner > of the axes. The convention 'upper' is typically used for matrices and > images. If not given, rcParams["image.origin"] > > is used, defaulting to 'upper'. > > Note that the vertical axes points upward for 'lower' but downward for > 'upper'. > > On Thu, Jun 6, 2019 at 9:25 AM Neal Becker wrote: > >> I just wasted quite a bit of time trying to debug my code. It took a >> long >> time because I was using imshow to debug, and didn't know that imshow >> displays a matrix not using cartesian coordinates. The axes are >> transposed >> and one axis is reversed. The documentation doesn't mention this. >> >> Thanks, >> Neal >> >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users at python.org >> https://mail.python.org/mailman/listinfo/matplotlib-users >> > _______________________________________________ > 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 ndbecker2 at gmail.com Thu Jun 6 09:42:28 2019 From: ndbecker2 at gmail.com (Neal Becker) Date: Thu, 6 Jun 2019 09:42:28 -0400 Subject: [Matplotlib-users] please document imshow axes order In-Reply-To: References: Message-ID: My suggestion is to enhance the documentation. If there is a nice tutorial, adding a link to it would be great. Thanks, Neal On Thu, Jun 6, 2019 at 9:39 AM Thomas Caswell wrote: > > There is also a tutorial addressing the ways that `origin` and `extent` interact with each other: https://matplotlib.org/tutorials/intermediate/imshow_extent.html > > As for the transpose, that is due to one branch of math teaching use to think (x, y) and different branch of math teaching us to think (row, column). For `imshow` we use the second one which is consistent with how numpy's repr of on array. It would be confusing if the data for `my_array[0, :]` was displayed as the first _column_ of the image. > > I do not disagree that this is frustrating/confusing, there is a comment in some of my grad school code which is basically "getting the (x,y) vs (r,c) conversions right here took you an afternoon, don't touch this again!" ;) > > Tom > > On Thu, Jun 6, 2019 at 9:31 AM Nathan Goldbaum wrote: >> >> This is discussed in the description of the "origin" keyword argument: >> >> origin : {'upper', 'lower'}, optional >> >> Place the [0,0] index of the array in the upper left or lower left corner of the axes. The convention 'upper' is typically used for matrices and images. If not given, rcParams["image.origin"] is used, defaulting to 'upper'. >> >> Note that the vertical axes points upward for 'lower' but downward for 'upper'. >> >> >> On Thu, Jun 6, 2019 at 9:25 AM Neal Becker wrote: >>> >>> I just wasted quite a bit of time trying to debug my code. It took a long >>> time because I was using imshow to debug, and didn't know that imshow >>> displays a matrix not using cartesian coordinates. The axes are transposed >>> and one axis is reversed. The documentation doesn't mention this. >>> >>> Thanks, >>> Neal >>> >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Matplotlib-users at python.org >>> https://mail.python.org/mailman/listinfo/matplotlib-users >> >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users at python.org >> https://mail.python.org/mailman/listinfo/matplotlib-users > > > > -- > Thomas Caswell > tcaswell at gmail.com -- Those who don't understand recursion are doomed to repeat it From nathan12343 at gmail.com Thu Jun 6 10:01:16 2019 From: nathan12343 at gmail.com (Nathan Goldbaum) Date: Thu, 6 Jun 2019 10:01:16 -0400 Subject: [Matplotlib-users] please document imshow axes order In-Reply-To: References: Message-ID: Done: https://github.com/matplotlib/matplotlib/pull/14464 btw, you can do stuff like this yourself :) On Thu, Jun 6, 2019 at 9:43 AM Neal Becker wrote: > My suggestion is to enhance the documentation. If there is a nice > tutorial, adding a link to it would be great. > Thanks, > Neal > > On Thu, Jun 6, 2019 at 9:39 AM Thomas Caswell wrote: > > > > There is also a tutorial addressing the ways that `origin` and `extent` > interact with each other: > https://matplotlib.org/tutorials/intermediate/imshow_extent.html > > > > As for the transpose, that is due to one branch of math teaching use to > think (x, y) and different branch of math teaching us to think (row, > column). For `imshow` we use the second one which is consistent with how > numpy's repr of on array. It would be confusing if the data for > `my_array[0, :]` was displayed as the first _column_ of the image. > > > > I do not disagree that this is frustrating/confusing, there is a comment > in some of my grad school code which is basically "getting the (x,y) vs > (r,c) conversions right here took you an afternoon, don't touch this > again!" ;) > > > > Tom > > > > On Thu, Jun 6, 2019 at 9:31 AM Nathan Goldbaum > wrote: > >> > >> This is discussed in the description of the "origin" keyword argument: > >> > >> origin : {'upper', 'lower'}, optional > >> > >> Place the [0,0] index of the array in the upper left or lower left > corner of the axes. The convention 'upper' is typically used for matrices > and images. If not given, rcParams["image.origin"] is used, defaulting to > 'upper'. > >> > >> Note that the vertical axes points upward for 'lower' but downward for > 'upper'. > >> > >> > >> On Thu, Jun 6, 2019 at 9:25 AM Neal Becker wrote: > >>> > >>> I just wasted quite a bit of time trying to debug my code. It took a > long > >>> time because I was using imshow to debug, and didn't know that imshow > >>> displays a matrix not using cartesian coordinates. The axes are > transposed > >>> and one axis is reversed. The documentation doesn't mention this. > >>> > >>> Thanks, > >>> Neal > >>> > >>> _______________________________________________ > >>> Matplotlib-users mailing list > >>> Matplotlib-users at python.org > >>> https://mail.python.org/mailman/listinfo/matplotlib-users > >> > >> _______________________________________________ > >> Matplotlib-users mailing list > >> Matplotlib-users at python.org > >> https://mail.python.org/mailman/listinfo/matplotlib-users > > > > > > > > -- > > Thomas Caswell > > tcaswell at gmail.com > > > > -- > Those who don't understand recursion are doomed to repeat it > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kotaro.saito at psi.ch Thu Jun 6 09:59:34 2019 From: kotaro.saito at psi.ch (Saito Kotaro (PSI)) Date: Thu, 6 Jun 2019 15:59:34 +0200 Subject: [Matplotlib-users] please document imshow axes order In-Reply-To: References: Message-ID: <5A62CD51-6919-41CF-9200-283FE6194E01@psi.ch> I went through the exact same issue some years ago and wrote a note about this confusing definition of the directions in 2D arrays. It?s written in Japanese but I think it's still understandable for most of you who can read matplotlib and numpy codes. https://qiita.com/skotaro/items/1bc4db69b53210d839ec I hope this would help for improving a tutorial or the documentation. Best regards, Kotaro //================//================// Paul Scherrer Institut Kotaro SAITO ????? Laboratory for Neutron Scattering and Imaging WHGA/348 5232 Villigen PSI, Schweiz +41 56 310 3179 kotaro.saito at psi.ch https://sites.google.com/view/kotarosaito/ //================//================// > On 2019/6/ 6, at 15:42, Neal Becker wrote: > > My suggestion is to enhance the documentation. If there is a nice > tutorial, adding a link to it would be great. > Thanks, > Neal > > On Thu, Jun 6, 2019 at 9:39 AM Thomas Caswell wrote: >> >> There is also a tutorial addressing the ways that `origin` and `extent` interact with each other: https://matplotlib.org/tutorials/intermediate/imshow_extent.html >> >> As for the transpose, that is due to one branch of math teaching use to think (x, y) and different branch of math teaching us to think (row, column). For `imshow` we use the second one which is consistent with how numpy's repr of on array. It would be confusing if the data for `my_array[0, :]` was displayed as the first _column_ of the image. >> >> I do not disagree that this is frustrating/confusing, there is a comment in some of my grad school code which is basically "getting the (x,y) vs (r,c) conversions right here took you an afternoon, don't touch this again!" ;) >> >> Tom >> >> On Thu, Jun 6, 2019 at 9:31 AM Nathan Goldbaum wrote: >>> >>> This is discussed in the description of the "origin" keyword argument: >>> >>> origin : {'upper', 'lower'}, optional >>> >>> Place the [0,0] index of the array in the upper left or lower left corner of the axes. The convention 'upper' is typically used for matrices and images. If not given, rcParams["image.origin"] is used, defaulting to 'upper'. >>> >>> Note that the vertical axes points upward for 'lower' but downward for 'upper'. >>> >>> >>> On Thu, Jun 6, 2019 at 9:25 AM Neal Becker wrote: >>>> >>>> I just wasted quite a bit of time trying to debug my code. It took a long >>>> time because I was using imshow to debug, and didn't know that imshow >>>> displays a matrix not using cartesian coordinates. The axes are transposed >>>> and one axis is reversed. The documentation doesn't mention this. >>>> >>>> Thanks, >>>> Neal >>>> >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Matplotlib-users at python.org >>>> https://mail.python.org/mailman/listinfo/matplotlib-users >>> >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Matplotlib-users at python.org >>> https://mail.python.org/mailman/listinfo/matplotlib-users >> >> >> >> -- >> Thomas Caswell >> tcaswell at gmail.com > > > > -- > Those who don't understand recursion are doomed to repeat it > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users From ndbecker2 at gmail.com Thu Jun 6 10:11:00 2019 From: ndbecker2 at gmail.com (Neal Becker) Date: Thu, 6 Jun 2019 10:11:00 -0400 Subject: [Matplotlib-users] please document imshow axes order In-Reply-To: <5A62CD51-6919-41CF-9200-283FE6194E01@psi.ch> References: <5A62CD51-6919-41CF-9200-283FE6194E01@psi.ch> Message-ID: Actually I found this pdf https://www.mubdirahman.com/assets/lecture-6---advanced-plotting.pdf starting at page 6 explained things quite well On Thu, Jun 6, 2019 at 10:02 AM Saito Kotaro (PSI) wrote: > > I went through the exact same issue some years ago and wrote a note about this confusing definition of the directions in 2D arrays. > It?s written in Japanese but I think it's still understandable for most of you who can read matplotlib and numpy codes. > https://qiita.com/skotaro/items/1bc4db69b53210d839ec > > I hope this would help for improving a tutorial or the documentation. > > Best regards, > > Kotaro > > //================//================// > Paul Scherrer Institut > Kotaro SAITO ????? > Laboratory for Neutron Scattering and Imaging > WHGA/348 > 5232 Villigen PSI, Schweiz > +41 56 310 3179 > kotaro.saito at psi.ch > https://sites.google.com/view/kotarosaito/ > //================//================// > > > On 2019/6/ 6, at 15:42, Neal Becker wrote: > > > > My suggestion is to enhance the documentation. If there is a nice > > tutorial, adding a link to it would be great. > > Thanks, > > Neal > > > > On Thu, Jun 6, 2019 at 9:39 AM Thomas Caswell wrote: > >> > >> There is also a tutorial addressing the ways that `origin` and `extent` interact with each other: https://matplotlib.org/tutorials/intermediate/imshow_extent.html > >> > >> As for the transpose, that is due to one branch of math teaching use to think (x, y) and different branch of math teaching us to think (row, column). For `imshow` we use the second one which is consistent with how numpy's repr of on array. It would be confusing if the data for `my_array[0, :]` was displayed as the first _column_ of the image. > >> > >> I do not disagree that this is frustrating/confusing, there is a comment in some of my grad school code which is basically "getting the (x,y) vs (r,c) conversions right here took you an afternoon, don't touch this again!" ;) > >> > >> Tom > >> > >> On Thu, Jun 6, 2019 at 9:31 AM Nathan Goldbaum wrote: > >>> > >>> This is discussed in the description of the "origin" keyword argument: > >>> > >>> origin : {'upper', 'lower'}, optional > >>> > >>> Place the [0,0] index of the array in the upper left or lower left corner of the axes. The convention 'upper' is typically used for matrices and images. If not given, rcParams["image.origin"] is used, defaulting to 'upper'. > >>> > >>> Note that the vertical axes points upward for 'lower' but downward for 'upper'. > >>> > >>> > >>> On Thu, Jun 6, 2019 at 9:25 AM Neal Becker wrote: > >>>> > >>>> I just wasted quite a bit of time trying to debug my code. It took a long > >>>> time because I was using imshow to debug, and didn't know that imshow > >>>> displays a matrix not using cartesian coordinates. The axes are transposed > >>>> and one axis is reversed. The documentation doesn't mention this. > >>>> > >>>> Thanks, > >>>> Neal > >>>> > >>>> _______________________________________________ > >>>> Matplotlib-users mailing list > >>>> Matplotlib-users at python.org > >>>> https://mail.python.org/mailman/listinfo/matplotlib-users > >>> > >>> _______________________________________________ > >>> Matplotlib-users mailing list > >>> Matplotlib-users at python.org > >>> https://mail.python.org/mailman/listinfo/matplotlib-users > >> > >> > >> > >> -- > >> Thomas Caswell > >> tcaswell at gmail.com > > > > > > > > -- > > Those who don't understand recursion are doomed to repeat it > > _______________________________________________ > > Matplotlib-users mailing list > > Matplotlib-users at python.org > > https://mail.python.org/mailman/listinfo/matplotlib-users > -- Those who don't understand recursion are doomed to repeat it From jklymak at uvic.ca Thu Jun 6 12:35:13 2019 From: jklymak at uvic.ca (Jody Klymak) Date: Thu, 6 Jun 2019 09:35:13 -0700 Subject: [Matplotlib-users] please document imshow axes order In-Reply-To: References: <5A62CD51-6919-41CF-9200-283FE6194E01@psi.ch> Message-ID: I think a useful way to think about it is to ask how you?d present an x-y array of numbers if you wrote them in a table. If you saw a table: 1 3 4 7 2 7 8 1 5 9 6 5 and you said this was an array in x and y, I think most people would naturally assume x increases column-wise (i.e. the x-axis of the table) and y increases row-wise (i.e. the y-axis of the table). Of course the opposite is another sometimes used convention, so its not like there is any fast rule, but I find that a useful justification for the convention numpy/matplotlib use. C uses the column-major order, but FORTRAN, (and hence Matlab, Numpy, and most other scientific software packages) use row-major: https://en.wikipedia.org/wiki/Row-_and_column-major_order ie in numpy: ``` In [4]: a = np.array([[1, 2, 3],[4, 5, 6]]) In [6]: print(a) [[1 2 3] [4 5 6]] ``` Cheers, Jody > On 6 Jun 2019, at 07:11, Neal Becker wrote: > > Actually I found this pdf > https://www.mubdirahman.com/assets/lecture-6---advanced-plotting.pdf > starting at page 6 explained things quite well > > On Thu, Jun 6, 2019 at 10:02 AM Saito Kotaro (PSI) > wrote: >> >> I went through the exact same issue some years ago and wrote a note about this confusing definition of the directions in 2D arrays. >> It?s written in Japanese but I think it's still understandable for most of you who can read matplotlib and numpy codes. >> https://qiita.com/skotaro/items/1bc4db69b53210d839ec >> >> I hope this would help for improving a tutorial or the documentation. >> >> Best regards, >> >> Kotaro >> >> //================//================// >> Paul Scherrer Institut >> Kotaro SAITO ????? >> Laboratory for Neutron Scattering and Imaging >> WHGA/348 >> 5232 Villigen PSI, Schweiz >> +41 56 310 3179 >> kotaro.saito at psi.ch >> https://sites.google.com/view/kotarosaito/ >> //================//================// >> >>> On 2019/6/ 6, at 15:42, Neal Becker wrote: >>> >>> My suggestion is to enhance the documentation. If there is a nice >>> tutorial, adding a link to it would be great. >>> Thanks, >>> Neal >>> >>> On Thu, Jun 6, 2019 at 9:39 AM Thomas Caswell wrote: >>>> >>>> There is also a tutorial addressing the ways that `origin` and `extent` interact with each other: https://matplotlib.org/tutorials/intermediate/imshow_extent.html >>>> >>>> As for the transpose, that is due to one branch of math teaching use to think (x, y) and different branch of math teaching us to think (row, column). For `imshow` we use the second one which is consistent with how numpy's repr of on array. It would be confusing if the data for `my_array[0, :]` was displayed as the first _column_ of the image. >>>> >>>> I do not disagree that this is frustrating/confusing, there is a comment in some of my grad school code which is basically "getting the (x,y) vs (r,c) conversions right here took you an afternoon, don't touch this again!" ;) >>>> >>>> Tom >>>> >>>> On Thu, Jun 6, 2019 at 9:31 AM Nathan Goldbaum wrote: >>>>> >>>>> This is discussed in the description of the "origin" keyword argument: >>>>> >>>>> origin : {'upper', 'lower'}, optional >>>>> >>>>> Place the [0,0] index of the array in the upper left or lower left corner of the axes. The convention 'upper' is typically used for matrices and images. If not given, rcParams["image.origin"] is used, defaulting to 'upper'. >>>>> >>>>> Note that the vertical axes points upward for 'lower' but downward for 'upper'. >>>>> >>>>> >>>>> On Thu, Jun 6, 2019 at 9:25 AM Neal Becker wrote: >>>>>> >>>>>> I just wasted quite a bit of time trying to debug my code. It took a long >>>>>> time because I was using imshow to debug, and didn't know that imshow >>>>>> displays a matrix not using cartesian coordinates. The axes are transposed >>>>>> and one axis is reversed. The documentation doesn't mention this. >>>>>> >>>>>> Thanks, >>>>>> Neal >>>>>> >>>>>> _______________________________________________ >>>>>> Matplotlib-users mailing list >>>>>> Matplotlib-users at python.org >>>>>> https://mail.python.org/mailman/listinfo/matplotlib-users >>>>> >>>>> _______________________________________________ >>>>> Matplotlib-users mailing list >>>>> Matplotlib-users at python.org >>>>> https://mail.python.org/mailman/listinfo/matplotlib-users >>>> >>>> >>>> >>>> -- >>>> Thomas Caswell >>>> tcaswell at gmail.com >>> >>> >>> >>> -- >>> Those who don't understand recursion are doomed to repeat it >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Matplotlib-users at python.org >>> https://mail.python.org/mailman/listinfo/matplotlib-users >> > > > -- > Those who don't understand recursion are doomed to repeat it > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users -- Jody Klymak http://web.uvic.ca/~jklymak/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From tcaswell at gmail.com Thu Jun 6 13:12:07 2019 From: tcaswell at gmail.com (Thomas Caswell) Date: Thu, 6 Jun 2019 13:12:07 -0400 Subject: [Matplotlib-users] please document imshow axes order In-Reply-To: References: <5A62CD51-6919-41CF-9200-283FE6194E01@psi.ch> Message-ID: MATLAB and FORTRAN are column-major, C/c++ and numpy are row-major. Tom On Thu, Jun 6, 2019 at 12:49 PM Jody Klymak wrote: > I think a useful way to think about it is to ask how you?d present an x-y > array of numbers if you wrote them in a table. If you saw a table: > > 1 3 4 7 > 2 7 8 1 > 5 9 6 5 > > and you said this was an array in x and y, I think most people would > naturally assume x increases column-wise (i.e. the x-axis of the table) and > y increases row-wise (i.e. the y-axis of the table). Of course the > opposite is another sometimes used convention, so its not like there is any > fast rule, but I find that a useful justification for the convention > numpy/matplotlib use. > > C uses the column-major order, but FORTRAN, (and hence Matlab, Numpy, and > most other scientific software packages) use row-major: > > https://en.wikipedia.org/wiki/Row-_and_column-major_order > > ie in numpy: > > ``` > In [4]: a = np.array([[1, 2, 3],[4, 5, 6]]) > > In [6]: print(a) > [[1 2 3] > [4 5 6]] > ``` > > Cheers, Jody > > > > On 6 Jun 2019, at 07:11, Neal Becker wrote: > > Actually I found this pdf > https://www.mubdirahman.com/assets/lecture-6---advanced-plotting.pdf > starting at page 6 explained things quite well > > On Thu, Jun 6, 2019 at 10:02 AM Saito Kotaro (PSI) > wrote: > > > I went through the exact same issue some years ago and wrote a note about > this confusing definition of the directions in 2D arrays. > It?s written in Japanese but I think it's still understandable for most of > you who can read matplotlib and numpy codes. > https://qiita.com/skotaro/items/1bc4db69b53210d839ec > > I hope this would help for improving a tutorial or the documentation. > > Best regards, > > Kotaro > > //================//================// > Paul Scherrer Institut > Kotaro SAITO ????? > Laboratory for Neutron Scattering and Imaging > WHGA/348 > 5232 Villigen PSI, Schweiz > +41 56 310 3179 > kotaro.saito at psi.ch > https://sites.google.com/view/kotarosaito/ > //================//================// > > On 2019/6/ 6, at 15:42, Neal Becker wrote: > > My suggestion is to enhance the documentation. If there is a nice > tutorial, adding a link to it would be great. > Thanks, > Neal > > On Thu, Jun 6, 2019 at 9:39 AM Thomas Caswell wrote: > > > There is also a tutorial addressing the ways that `origin` and `extent` > interact with each other: > https://matplotlib.org/tutorials/intermediate/imshow_extent.html > > As for the transpose, that is due to one branch of math teaching use to > think (x, y) and different branch of math teaching us to think (row, > column). For `imshow` we use the second one which is consistent with how > numpy's repr of on array. It would be confusing if the data for > `my_array[0, :]` was displayed as the first _column_ of the image. > > I do not disagree that this is frustrating/confusing, there is a comment > in some of my grad school code which is basically "getting the (x,y) vs > (r,c) conversions right here took you an afternoon, don't touch this > again!" ;) > > Tom > > On Thu, Jun 6, 2019 at 9:31 AM Nathan Goldbaum > wrote: > > > This is discussed in the description of the "origin" keyword argument: > > origin : {'upper', 'lower'}, optional > > Place the [0,0] index of the array in the upper left or lower left corner > of the axes. The convention 'upper' is typically used for matrices and > images. If not given, rcParams["image.origin"] is used, defaulting to > 'upper'. > > Note that the vertical axes points upward for 'lower' but downward for > 'upper'. > > > On Thu, Jun 6, 2019 at 9:25 AM Neal Becker wrote: > > > I just wasted quite a bit of time trying to debug my code. It took a long > time because I was using imshow to debug, and didn't know that imshow > displays a matrix not using cartesian coordinates. The axes are transposed > and one axis is reversed. The documentation doesn't mention this. > > Thanks, > Neal > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > > > > > -- > Thomas Caswell > tcaswell at gmail.com > > > > > -- > Those who don't understand recursion are doomed to repeat it > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > > > > > -- > Those who don't understand recursion are doomed to repeat it > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > > > -- > Jody Klymak > http://web.uvic.ca/~jklymak/ > > > > > > _______________________________________________ > 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 efiring at hawaii.edu Thu Jun 6 13:58:22 2019 From: efiring at hawaii.edu (Eric Firing) Date: Thu, 6 Jun 2019 07:58:22 -1000 Subject: [Matplotlib-users] please document imshow axes order In-Reply-To: References: <5A62CD51-6919-41CF-9200-283FE6194E01@psi.ch> Message-ID: <8bdd1270-51fd-dca0-c90f-0cf867de49b9@hawaii.edu> On 2019/06/06 7:12 AM, Thomas Caswell wrote: > MATLAB and FORTRAN are column-major, C/c++ and numpy are row-major. Unfortunately, that "-major" terminology is hopelessly confusing--as we have just seen. From xiejinbo at mail.iap.ac.cn Sat Jun 15 04:05:10 2019 From: xiejinbo at mail.iap.ac.cn (=?UTF-8?B?6LCi55G+5Y2a?=) Date: Sat, 15 Jun 2019 16:05:10 +0800 (GMT+08:00) Subject: [Matplotlib-users] questions about changing coordinate position in 3D plotting In-Reply-To: <2f177359.5187.16b5a1eac4e.Coremail.xiejinbo@mail.iap.ac.cn> References: <2f177359.5187.16b5a1eac4e.Coremail.xiejinbo@mail.iap.ac.cn> Message-ID: <326c4110.5696.16b5a2b3994.Coremail.xiejinbo@mail.iap.ac.cn> Dear Users, I have a question regarding the positioning of the coordinate. As you can see in this picture, the z-coordinate is on the right edge of the figure. While my need is to put it on the left edge (another face also). I wonder how this can be achieved? yours, Jinbo -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1560585005768.png Type: image/png Size: 181200 bytes Desc: not available URL: From xiejinbo at mail.iap.ac.cn Sat Jun 15 03:51:28 2019 From: xiejinbo at mail.iap.ac.cn (=?UTF-8?B?6LCi55G+5Y2a?=) Date: Sat, 15 Jun 2019 15:51:28 +0800 (GMT+08:00) Subject: [Matplotlib-users] questions about changing coordinate position in 3D plotting Message-ID: <2f177359.5187.16b5a1eac4e.Coremail.xiejinbo@mail.iap.ac.cn> Dear Users, I have a question regarding the positioning of the coordinate. As you can see in this picture, the z-coordinate is on the right edge of the figure. While my need is to put it on the left edge (another face also). I wonder how this can be achieved? yours, Jinbo -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1560585005768.png Type: image/png Size: 181200 bytes Desc: not available URL: From ben.v.root at gmail.com Sat Jun 15 17:47:47 2019 From: ben.v.root at gmail.com (Benjamin Root) Date: Sat, 15 Jun 2019 17:47:47 -0400 Subject: [Matplotlib-users] questions about changing coordinate position in 3D plotting In-Reply-To: <326c4110.5696.16b5a2b3994.Coremail.xiejinbo@mail.iap.ac.cn> References: <2f177359.5187.16b5a1eac4e.Coremail.xiejinbo@mail.iap.ac.cn> <326c4110.5696.16b5a2b3994.Coremail.xiejinbo@mail.iap.ac.cn> Message-ID: the mplot3d code uses a heuristic to determine which edges of the "cube" to use for axis and tick labelling. If you rotate the scene a bit, you'll find that the axis labels will move. Unfortunately, this logic is hard-coded and not very flexible at the moment. The code resides in axis3d.py, if I remember correctly. Ben Root On Sat, Jun 15, 2019 at 4:10 AM ??? wrote: > Dear Users, > I have a question regarding the positioning of the coordinate. As you can > see in this picture, the z-coordinate is on the right edge of the figure. > While my need is to put it on the left edge (another face also). I wonder > how this can be achieved? > yours, > Jinbo > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1560585005768.png Type: image/png Size: 181200 bytes Desc: not available URL: From xiejinbo at mail.iap.ac.cn Sat Jun 15 21:23:32 2019 From: xiejinbo at mail.iap.ac.cn (=?UTF-8?B?6LCi55G+5Y2a?=) Date: Sun, 16 Jun 2019 09:23:32 +0800 (GMT+08:00) Subject: [Matplotlib-users] questions about changing coordinate position in 3D plotting In-Reply-To: References: <2f177359.5187.16b5a1eac4e.Coremail.xiejinbo@mail.iap.ac.cn> <326c4110.5696.16b5a2b3994.Coremail.xiejinbo@mail.iap.ac.cn> Message-ID: <32bc0ea0.6b00.16b5de1ded3.Coremail.xiejinbo@mail.iap.ac.cn> I guess view_init is the best way, although I may need to reverse the array and the labels a bit. Thanks! Jinbo -----????----- ???:"Benjamin Root" ????:2019-06-16 05:47:47 (???) ???: "???" ??: Matplotlib-users ??: Re: [Matplotlib-users] questions about changing coordinate position in 3D plotting the mplot3d code uses a heuristic to determine which edges of the "cube" to use for axis and tick labelling. If you rotate the scene a bit, you'll find that the axis labels will move. Unfortunately, this logic is hard-coded and not very flexible at the moment. The code resides in axis3d.py, if I remember correctly. Ben Root On Sat, Jun 15, 2019 at 4:10 AM ??? wrote: Dear Users, I have a question regarding the positioning of the coordinate. As you can see in this picture, the z-coordinate is on the right edge of the figure. While my need is to put it on the left edge (another face also). I wonder how this can be achieved? yours, Jinbo _______________________________________________ Matplotlib-users mailing list Matplotlib-users at python.org https://mail.python.org/mailman/listinfo/matplotlib-users -- Dr. Jinbo Xie State Key Laboratory of Numerical Modeling for Atmospheric Sciences and Geophysical Fluid Dynamics (LASG) Institute of Atmospheric Physics,Chinese Academy of Sciences e-mail: xiejinbo at mail.iap.ac.cn Tel:86-10-8299-5419?o? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1560585005768.png Type: image/png Size: 181200 bytes Desc: not available URL: From xiejinbo at mail.iap.ac.cn Sun Jun 16 04:47:34 2019 From: xiejinbo at mail.iap.ac.cn (=?UTF-8?B?6LCi55G+5Y2a?=) Date: Sun, 16 Jun 2019 16:47:34 +0800 (GMT+08:00) Subject: [Matplotlib-users] Any way to add figure string for subplots Message-ID: <66c5831b.6195.16b5f786515.Coremail.xiejinbo@mail.iap.ac.cn> Dear Users, I am trying to do a subplot consist of several axes like one below. My problem is that the small figure string for each subplot (a)(b)(c), if there is any resource controlling this text, or I have to some other configurations? Jinbo -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1560674740589.png Type: image/png Size: 295824 bytes Desc: not available URL: From vincent.adrien at gmail.com Sun Jun 16 10:31:51 2019 From: vincent.adrien at gmail.com (vincent.adrien at gmail.com) Date: Sun, 16 Jun 2019 16:31:51 +0200 Subject: [Matplotlib-users] Any way to add figure string for subplots In-Reply-To: <66c5831b.6195.16b5f786515.Coremail.xiejinbo@mail.iap.ac.cn> References: <66c5831b.6195.16b5f786515.Coremail.xiejinbo@mail.iap.ac.cn> Message-ID: <8112a5a3-9a20-0a4c-9884-0e50b4d51b04@gmail.com> Hi Jinbo, You should be able to achieve this with `annotate`. Here is a small snippet demonstrating its basic use: ```python import matplotlib.pyplot as plt plt.ion() fig, axs = plt.subplots(ncols=2, nrows=2) # dummy 2x2 subplot grid # NB: a better annotation tutorial is available at # https://matplotlib.org/tutorials/text/annotations.html for ax, label in zip(axs.flat, ["(a)", "(b)", "(c)", "(d)"]): ax.annotate(label, (0.02, 0.03), xycoords="axes fraction", # coordinates ha="left", va="bottom", # horiz. & vertical alignement weight="bold", style="italic" # font option examples ) ``` If you need to draw a white box behind the annotations, please have a look at https://matplotlib.org/tutorials/text/annotations.html#annotating-with-text-with-box Hopefully this helps. Best regards, Adrien Le 16/06/2019 ? 10:47, ??? a ?crit?: > Dear Users, > I am trying to do a subplot consist of several axes like one below. My > problem is that the small figure string for each subplot (a)(b)(c), if > there is any resource controlling this text, or I have to some other > configurations? > Jinbo > > > > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > From xiejinbo at mail.iap.ac.cn Mon Jun 17 00:06:37 2019 From: xiejinbo at mail.iap.ac.cn (=?UTF-8?B?6LCi55G+5Y2a?=) Date: Mon, 17 Jun 2019 12:06:37 +0800 (GMT+08:00) Subject: [Matplotlib-users] Any way to add figure string for subplots In-Reply-To: <8112a5a3-9a20-0a4c-9884-0e50b4d51b04@gmail.com> References: <66c5831b.6195.16b5f786515.Coremail.xiejinbo@mail.iap.ac.cn> <8112a5a3-9a20-0a4c-9884-0e50b4d51b04@gmail.com> Message-ID: <6fc4e185.7fb5.16b639d8935.Coremail.xiejinbo@mail.iap.ac.cn> Hi Vincent, Thanks, I have looked into this, and the labels works pretty fine! yours, Jinbo > -----????----- > ???: "vincent.adrien at gmail.com" > ????: 2019-06-16 22:31:51 (???) > ???: matplotlib-users at python.org > ??: > ??: Re: [Matplotlib-users] Any way to add figure string for subplots > > Hi Jinbo, > > You should be able to achieve this with `annotate`. Here is a small > snippet demonstrating its basic use: > ```python > import matplotlib.pyplot as plt > plt.ion() > > fig, axs = plt.subplots(ncols=2, nrows=2) # dummy 2x2 subplot grid > > # NB: a better annotation tutorial is available at > # https://matplotlib.org/tutorials/text/annotations.html > for ax, label in zip(axs.flat, ["(a)", "(b)", "(c)", "(d)"]): > ax.annotate(label, > (0.02, 0.03), xycoords="axes fraction", # coordinates > ha="left", va="bottom", # horiz. & vertical alignement > weight="bold", style="italic" # font option examples > ) > ``` > > If you need to draw a white box behind the annotations, please have a > look at > https://matplotlib.org/tutorials/text/annotations.html#annotating-with-text-with-box > > Hopefully this helps. > > Best regards, > Adrien > > Le 16/06/2019 ? 10:47, ??? a ?crit?: > > Dear Users, > > I am trying to do a subplot consist of several axes like one below. My > > problem is that the small figure string for each subplot (a)(b)(c), if > > there is any resource controlling this text, or I have to some other > > configurations? > > Jinbo > > > > > > > > > > _______________________________________________ > > Matplotlib-users mailing list > > Matplotlib-users at python.org > > https://mail.python.org/mailman/listinfo/matplotlib-users > > > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users -- Dr. Jinbo Xie State Key Laboratory of Numerical Modeling for Atmospheric Sciences and Geophysical Fluid Dynamics (LASG) Institute of Atmospheric Physics,Chinese Academy of Sciences e-mail: xiejinbo at mail.iap.ac.cn Tel:86-10-8299-5419?o? From xiejinbo at mail.iap.ac.cn Mon Jun 17 07:13:52 2019 From: xiejinbo at mail.iap.ac.cn (=?UTF-8?B?6LCi55G+5Y2a?=) Date: Mon, 17 Jun 2019 19:13:52 +0800 (GMT+08:00) Subject: [Matplotlib-users] About unstructured grid plotting in 3D Message-ID: <3268df50.b180.16b6524b4ff.Coremail.xiejinbo@mail.iap.ac.cn> Dear Users, I am currently trying to map a grid of unstructured topography on 3D in python. The data which I am using is in 1d, where another x and y are in 1d. I see that the need for plot_surface is 2d X,Y,Z. I wonder if there is a way I can transform the data to plot for view in topography, or the plot_surface or alternative functions can be used to simply apply the 1d arrays? PS. Below is the large grid that overlays on the unstructured grid. yours, Jinbo -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1560769855852.png Type: image/png Size: 7490 bytes Desc: not available URL: From ianthomas23 at gmail.com Tue Jun 18 04:27:09 2019 From: ianthomas23 at gmail.com (Ian Thomas) Date: Tue, 18 Jun 2019 09:27:09 +0100 Subject: [Matplotlib-users] About unstructured grid plotting in 3D In-Reply-To: <3268df50.b180.16b6524b4ff.Coremail.xiejinbo@mail.iap.ac.cn> References: <3268df50.b180.16b6524b4ff.Coremail.xiejinbo@mail.iap.ac.cn> Message-ID: Hello Jinbo, The online documentation for mplot3d is at https://matplotlib.org/3.1.0/tutorials/toolkits/mplot3d.html and includes a section entitled "Tri-Surface Plots". That would be a good place to start. Ian Thomas On Mon, 17 Jun 2019 at 12:14, ??? wrote: > Dear Users, > I am currently trying to map a grid of unstructured topography on 3D in > python. The data which I am using is in 1d, where another x and y are in > 1d. I see that the need for plot_surface is 2d X,Y,Z. I wonder if there is > a way I can transform the data to plot for view in topography, or the > plot_surface or alternative functions can be used to simply apply the 1d > arrays? > PS. Below is the large grid that overlays on the unstructured grid. > yours, > Jinbo > > > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1560769855852.png Type: image/png Size: 7490 bytes Desc: not available URL: From nurialovedogs at gmail.com Tue Jun 4 06:29:33 2019 From: nurialovedogs at gmail.com (Nuria Gombao) Date: Tue, 4 Jun 2019 12:29:33 +0200 Subject: [Matplotlib-users] Problem with matplotlib Message-ID: Dear Matplotlib, First of all I'm going to provide the information that you required. Operating system: Windows Matplotlib version: 2.0.0b4 Source of Matplotlib: Anaconda My problem is that I am trying to plot a real simple problem, but I get an error (image 1) that says: "TypeError: unbound method __init__() must be called with Affine2DBase instance as first argument (got Affine2D instance instead)" . I'm going to attached you the simple program (example_plot.py), the document where it is supossed to be the problem (transforms.py) and the image from this error (image_1). I really don't know what to do. Thanks for your help [image: image.png] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 38583 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Example_plot.py Type: application/octet-stream Size: 335 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: transforms.py Type: application/octet-stream Size: 96728 bytes Desc: not available URL: From ysxie at iis.u-tokyo.ac.jp Wed Jun 5 10:07:44 2019 From: ysxie at iis.u-tokyo.ac.jp (Yaoshu Xie) Date: Wed, 5 Jun 2019 23:07:44 +0900 Subject: [Matplotlib-users] Problems with the new version Message-ID: <20190605140744.9768030447F58@mail.iis.u-tokyo.ac.jp> Dear producer My python program can be ran in an old computer with matplotlib 3.0.2 but cant go well in the new 3.1.0. Could you please kindly help me with this or give me an copy of the old 3.0.2 version? There are two jupyter notebook file in the TEST folder. You can ran them and see the problems. One is the error coming out and the other is the picture not able to be shown. Best wishes, Yaoshu Xie -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GB_code-master.rar Type: application/rar Size: 808583 bytes Desc: not available URL: From xiejinbo at mail.iap.ac.cn Tue Jun 18 09:11:12 2019 From: xiejinbo at mail.iap.ac.cn (=?UTF-8?B?6LCi55G+5Y2a?=) Date: Tue, 18 Jun 2019 21:11:12 +0800 (GMT+08:00) Subject: [Matplotlib-users] About unstructured grid plotting in 3D In-Reply-To: References: <3268df50.b180.16b6524b4ff.Coremail.xiejinbo@mail.iap.ac.cn> Message-ID: <130fce8.d0cc.16b6ab67a26.Coremail.xiejinbo@mail.iap.ac.cn> Thanks Ian, I think this is the most appropriate way for me to do it. yours, Jinbo -----????----- ???:"Ian Thomas" ????:2019-06-18 16:27:09 (???) ???: "???" ??: Matplotlib-users ??: Re: [Matplotlib-users] About unstructured grid plotting in 3D Hello Jinbo, The online documentation for mplot3d is at https://matplotlib.org/3.1.0/tutorials/toolkits/mplot3d.html and includes a section entitled "Tri-Surface Plots". That would be a good place to start. Ian Thomas On Mon, 17 Jun 2019 at 12:14, ??? wrote: Dear Users, I am currently trying to map a grid of unstructured topography on 3D in python. The data which I am using is in 1d, where another x and y are in 1d. I see that the need for plot_surface is 2d X,Y,Z. I wonder if there is a way I can transform the data to plot for view in topography, or the plot_surface or alternative functions can be used to simply apply the 1d arrays? PS. Below is the large grid that overlays on the unstructured grid. yours, Jinbo _______________________________________________ Matplotlib-users mailing list Matplotlib-users at python.org https://mail.python.org/mailman/listinfo/matplotlib-users -- Dr. Jinbo Xie State Key Laboratory of Numerical Modeling for Atmospheric Sciences and Geophysical Fluid Dynamics (LASG) Institute of Atmospheric Physics,Chinese Academy of Sciences e-mail: xiejinbo at mail.iap.ac.cn Tel:86-10-8299-5419?o? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1560769855852.png Type: image/png Size: 7490 bytes Desc: not available URL: From pmhobson at gmail.com Tue Jun 18 15:10:21 2019 From: pmhobson at gmail.com (Paul Hobson) Date: Tue, 18 Jun 2019 12:10:21 -0700 Subject: [Matplotlib-users] Problems with the new version In-Reply-To: <20190605140744.9768030447F58@mail.iis.u-tokyo.ac.jp> References: <20190605140744.9768030447F58@mail.iis.u-tokyo.ac.jp> Message-ID: Oops. forgot to reply-all: Yaoshu, If you want a previous version of matplotlib, you can download and install directly from our Github repository: https://github.com/matplotlib/matplotlib/releases Or you can use pip or conda: pip install matplotlib=3.0 conda install matplotlib=3.0 On Tue, Jun 18, 2019 at 5:06 AM Yaoshu Xie wrote: > Dear producer > > > > My python program can be ran in an old computer with matplotlib 3.0.2 but > cant go well in the new 3.1.0. Could you please kindly help me with this or > give me an copy of the old 3.0.2 version? > > > > There are two jupyter notebook file in the TEST folder. You can ran them > and see the problems. One is the error coming out and the other is the > picture not able to be shown. > > > > Best wishes, > > Yaoshu Xie > > > _______________________________________________ > 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 pmhobson at gmail.com Tue Jun 18 15:12:28 2019 From: pmhobson at gmail.com (Paul Hobson) Date: Tue, 18 Jun 2019 12:12:28 -0700 Subject: [Matplotlib-users] Constant failed import In-Reply-To: References: Message-ID: Pierig, >From your screenshot, I'm not sure that matplotlib is the problem. How did you install it? Can you include a minimal working example to reproduce the problem? (in other words, the smallest code that only relies on matplotlib, its dependencies, and no external files) On Tue, Jun 18, 2019 at 5:04 AM Pierig Havez-Bodivit via Matplotlib-users < matplotlib-users at python.org> wrote: > Hi, my name is Pierig, I?m a French student, I use python for my study but > I?ve got issue with your library. > I?m running it on PyCharm and Pyzo on MacOSX and while I can import your > library, there's no way of using any of the module, such as : plt.figure() > or plt.plot() while other libraries like numpy work. I?ve got this message: > I really need your library to work, can you help me with that? > Sincerely yours > Pierig > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2019-04-14 at 14.57.40.png Type: image/png Size: 597280 bytes Desc: not available URL: From pmhobson at gmail.com Tue Jun 18 15:14:11 2019 From: pmhobson at gmail.com (Paul Hobson) Date: Tue, 18 Jun 2019 12:14:11 -0700 Subject: [Matplotlib-users] Problem with matplotlib In-Reply-To: References: Message-ID: Version 2.0.0b4 is strange, pre-release version to be running. Could you upgrade to at least a final release? On Tue, Jun 18, 2019 at 5:06 AM Nuria Gombao wrote: > Dear Matplotlib, > > First of all I'm going to provide the information that you required. > > Operating system: Windows > Matplotlib version: 2.0.0b4 > Source of Matplotlib: Anaconda > > My problem is that I am trying to plot a real simple problem, but I get an > error (image 1) that says: "TypeError: unbound method __init__() must be > called with Affine2DBase instance as first argument (got Affine2D instance > instead)" . I'm going to attached you the simple program (example_plot.py), > the document where it is supossed to be the problem (transforms.py) and the > image from this error (image_1). I really don't know what to do. > > Thanks for your help > > > > [image: image.png] > > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 38583 bytes Desc: not available URL: From xiejinbo at mail.iap.ac.cn Wed Jun 19 10:52:13 2019 From: xiejinbo at mail.iap.ac.cn (=?UTF-8?B?6LCi55G+5Y2a?=) Date: Wed, 19 Jun 2019 22:52:13 +0800 (GMT+08:00) Subject: [Matplotlib-users] about moving labels closer to coordinate in 3D plotting Message-ID: <73158f4b.1050b.16b70395220.Coremail.xiejinbo@mail.iap.ac.cn> Hi Everyone, I have a problem trying to set the X and Y label closer to the coordinate. I have ax.xaxis.set_ticks_position('top'),ax.yaxis.set_ticks_position('top') so that the ticks are close to the coordinate. As for the labels, I have tried ax.xaxis.set_label_position('bottom') ax.xaxis.set_label_position('top'), but neither seems to move the labels closer, is there any way to move it closer to the coordinates? yours, Jinbo -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1560955669657.png Type: image/png Size: 107705 bytes Desc: not available URL: From xiejinbo at mail.iap.ac.cn Thu Jun 20 01:53:47 2019 From: xiejinbo at mail.iap.ac.cn (=?UTF-8?B?6LCi55G+5Y2a?=) Date: Thu, 20 Jun 2019 13:53:47 +0800 (GMT+08:00) Subject: [Matplotlib-users] Problems with the arrow head size in 3D Message-ID: <2f838904.11bdd.16b7372bdb6.Coremail.xiejinbo@mail.iap.ac.cn> Hi everyone, I have been trying to draw the topo with arrow head shown as follow. However, for a typical topo (1000~6000), the arrow head will not show, and show a line only. This size of the arrow head seems to be sensitive to the range of the Z axis (as in the second picture, the head shows better when range is 1~5). I wonder if there is a set source to tune the size of the arrow head? yours, Jinbo -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1561009972955.png Type: image/png Size: 103177 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1561009991215.png Type: image/png Size: 97964 bytes Desc: not available URL: From sunshine.e4u at gmail.com Wed Jun 26 04:22:11 2019 From: sunshine.e4u at gmail.com (henryekene) Date: Wed, 26 Jun 2019 01:22:11 -0700 (MST) Subject: [Matplotlib-users] Matplotlib unable to plot on my windows 8.1 machine. Message-ID: <1561537331847-0.post@n5.nabble.com> I have installed the latest version of matplotlib but it's unable to plot. Below is the error message, please help: Traceback (most recent call last): File "C:/Users/Physics department/Desktop/Python_programs/2d_densityplot.py", line 2, in import matplotlib.pyplot as plt File "C:\Python36\lib\site-packages\matplotlib\__init__.py", line 200, in _check_versions() File "C:\Python36\lib\site-packages\matplotlib\__init__.py", line 194, in _check_versions module = importlib.import_module(modname) File "C:\Python36\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: DLL load failed: The specified module could not be found. >>> -- Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html