SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S

1
(6)
2
3
(11)
4
(1)
5
(26)
6
(3)
7
(9)
8
(9)
9
10
(4)
11
(4)
12
(4)
13
(5)
14
15
(1)
16
(2)
17
(6)
18
19
(1)
20
(3)
21
(2)
22
23
(6)
24
(3)
25
(7)
26
(2)
27
28
29
(2)
30
(7)




Showing results of 124

<< < 1 2 3 4 5 > >> (Page 3 of 5)
From: Joy m. m. <joy...@gm...> - 2015年06月12日 02:24:20
I think Fiona is what you are looking for. I use it regularly for the exact
same purpose.
On 12 Jun 2015 03:11, "Ronquillo, Edgar Nahum" <ero...@la...> wrote:
> Hello all,
>
> I am currently using Basemap to map a shapefile into a map which works
> perfect with some shapefiles. I notice it doesn’t work with point
> shapefiles which are only points in a map. Do I have to use another
> strategy to plot this points from the shapefile? I was thinking to extract
> the latitude and longitude points from the shapefile and plot those,
> however, I do not know if that is the best approach. Any feedback would be
> great.
>
>
>
> Thanks so much
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Ronquillo, E. N. <ero...@la...> - 2015年06月11日 21:40:53
Hello all,
I am currently using Basemap to map a shapefile into a map which works perfect with some shapefiles. I notice it doesn't work with point shapefiles which are only points in a map. Do I have to use another strategy to plot this points from the shapefile? I was thinking to extract the latitude and longitude points from the shapefile and plot those, however, I do not know if that is the best approach. Any feedback would be great.
Thanks so much
From: Sterling S. <sm...@fu...> - 2015年06月11日 05:32:13
Neal,
If you also want to get rid of the lines, you could just color the texts of the legend labels using a VPacker in something like
http://stackoverflow.com/questions/17086847/box-around-text-in-matplotlib/17092777#17092777
-Sterling
On Jun 10, 2015, at 10:25PM, Sterling Smith <sm...@fu...> wrote:
> Neal,
> 
> legend[1] has the title keyword
> legend(loc=‘best’,title=‘foo’)
> 
> -Sterling
> 
> [1] http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.legend
> On Jun 10, 2015, at 11:36AM, Neal Becker <ndb...@gm...> wrote:
> 
>> Is there some way I can add a short text to the legend box? Rather than 
>> having
>> label='foo=0'
>> label='foo=1'
>> ...
>> 
>> I'd like to just put 'foo' say at the top of the legend box. Any thoughts?
>> 
>> 
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Sterling S. <sm...@fu...> - 2015年06月11日 05:25:57
Neal,
legend[1] has the title keyword
legend(loc=‘best’,title=‘foo’)
-Sterling
[1] http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.legend
On Jun 10, 2015, at 11:36AM, Neal Becker <ndb...@gm...> wrote:
> Is there some way I can add a short text to the legend box? Rather than 
> having
> label='foo=0'
> label='foo=1'
> ...
> 
> I'd like to just put 'foo' say at the top of the legend box. Any thoughts?
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Dyah r. m. <dya...@gm...> - 2015年06月11日 01:54:01
Attachments: Obs_Map2.png
Dear All,
I drawed map by using basemap that show paralel and meridian line in
geographic coordinate.
How do I add another paralel/line that show line of geomagnetic coordinate?
Thank you....
I attached image of the current
​result...
Regards,
Dydy14
From: Neal B. <ndb...@gm...> - 2015年06月10日 18:36:40
Is there some way I can add a short text to the legend box? Rather than 
having
label='foo=0'
label='foo=1'
...
I'd like to just put 'foo' say at the top of the legend box. Any thoughts?
From: Jiali Ma <578...@qq...> - 2015年06月10日 14:24:39
Thanks for reading my mail.
In basemap toolkit of matplotlib, I found the Coastline data used is from
the GSHHS (http://www.soest.hawaii.edu/wessel/gshhs/gshhs.html).But I found
it barely satisfying to use.
(For that I am from China,but the 2 most prominent rivers,Yangtze river and
Yellow river are not shown ,and another less important river is shown)
So,here I am asking if there is how I can replace this GSHHS coasline data
with my data?How is GSHHS data formatted?So I'd probably work some way out
to make or find another set of data with the same format.
Thanks again for reading .
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Problem-on-Basemap-gshhs-data-and-the-associated-is-land-function-tp45761.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: egayer <eg...@ip...> - 2015年06月10日 08:23:40
Hi all, 
Is there a way to produce a KML file from matplolib results as R and Matlab
do ? 
- plotKML is a R package http://plotkml.r-forge.r-project.org
- Matlab has the Google Earth Toolbox. 
Both of them allow to plot directly on GE
I' have been digging around and found this old post :"Producing a
KML-friendly (Google Earth) image" but nothing about how to actually a
matplolib result as a KML file useable into Google Earth.
I have seen some shape to KML packages, but nothing about raster.
The ultimate goal being to use the "plot, mplot3d, imshow, etc..." to plot
any python array on GE.
Thanks for your help
Eric
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Produce-KML-from-Matplolib-tp45759.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Christopher S. <chr...@ya...> - 2015年06月10日 01:51:43
Hello,
First off I want to say that I have followed the "Completely remove matplotlib" steps on your website for the source build, used git to do a clean install and have done some additional research and followed a stack overflow post on this without any success. Basically the Stack Overflow had me try all the different backends in the configuration file which was in the /usr/lib64/site-packages/matplotlib...../matplotlib/mpl-data/matplotlibrc and none worked for me. I am attaching all the requested info for the computer architecture and build info below:
============== uname -a ======================================
Linux navier.areai 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue Nov 6 23:43:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
================== matplotlib version ============================
1.5.dev1 
obtained using github (git clone git://github.com/matplotlib/matplotlib.git)
============================================================
I made no edits to the setup.py file and I am building/installing from source on my Rocks 6.1 HPC cluster.
gcc is 4.9.2 and I have included the 
"python setup.py build" and "python setup.py install" outputs (build_OUTPUT and setupInstall_OUTPUT respectively) as well.
The simple_plot.py case run.out is also attached.
Please point me in the right direction!
-Chris
From: Sourish B. <sou...@gm...> - 2015年06月08日 22:39:17
<html>
 <head>
 <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
 </head>
 <body bgcolor="#FFFFFF" text="#000000">
 <div class="moz-cite-prefix"><br>
 On 06/05/2015 03:57 PM, Joe Kington wrote:<br>
 </div>
 <blockquote
cite="mid:CAC...@ma..."
 type="cite">
 <p dir="ltr">Not to plug one of my own answers to much, but here's
 a basic example. <a moz-do-not-send="true"
href="http://stackoverflow.com/questions/20144529/shifted-colorbar-matplotlib">http://stackoverflow.com/questions/20144529/shifted-colorbar-matplotlib</a></p>
 <p dir="ltr">I've been meeting to submit a PR with a more full
 featured version for a few years now, but haven't.</p>
 </blockquote>
 <br>
 This is great, but it has a slightly bothersome side effect on the
 colorbar ticks. In your original example, I changed the line 'data =
 10 * (data - 0.8)' to 'data = 10 * (data - 0.85)', so that the
 numbers are now in between -8.5 and +1.5. As a result, when the
 colorbar is drawn, you get a tick at -8, as well as one at -9
 (similarly at +1 and +2). Example attached. As in, the colorbar
 method seems intent on adding those tick marks at -9 and +2. The
 result is not aesthetically pleasing.<br>
 <br>
 In one of my real-data example, the minimum value of the data
 happened to be -4.003, and as a result there was a tick label at -4
 and an overlapping tick label at -5. Why does this happen only when
 I specify 'norm' in imshow? How do I get matplotlib to not do that?<br>
 <br>
 Thanks,<br>
 Sourish<br>
 <br>
 <blockquote
cite="mid:CAC...@ma..."
 type="cite">
 <div class="gmail_quote">On Jun 5, 2015 4:45 PM, "Sourish Basu"
 &lt;<a moz-do-not-send="true"
 href="mailto:sou...@gm...">sou...@gm...</a>&gt;
 wrote:<br type="attribution">
 <blockquote class="gmail_quote" style="margin:0 0 0
 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 <div bgcolor="#FFFFFF" text="#000000">
 <div>On 06/05/2015 01:20 PM, Eric Firing wrote: </div>
 <blockquote type="cite">
 <pre>Reminder: in matplotlib, color mapping is done with the combination of a 
colormap and a norm. This allows one to design a norm to handle the 
mapping, including any nonlinearity or difference between the handling 
of positive and negative values. This is more general than customizing 
a colormap; once you have a norm to suit your purpose, you can use it 
with any colormap.
Maybe this is actually what you are already doing, but I wanted to point 
it out here in case some readers are not familiar with this 
colormap+norm strategy.</pre>
 </blockquote>
 <br>
 Actually, I didn't use norms because I never quite figured
 out how to use them or how to make my own. If there's a way
 to create a norm with a custom mid-point, I'd love to
 know/use that.<br>
 <br>
 -Sourish<br>
 <br>
 <blockquote type="cite">
 <pre>
Eric
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
<a moz-do-not-send="true" href="mailto:Mat...@li..." target="_blank">Mat...@li...</a>
<a moz-do-not-send="true" href="https://lists.sourceforge.net/lists/listinfo/matplotlib-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/matplotlib-users</a>
</pre>
 </blockquote>
 <br>
 <br>
 <div>-- <br>
 <b>Q:</b> What if you strapped C4 to a boomerang? Could
 this be an effective weapon, or would it be as stupid as
 it sounds?<br>
 <b>A:</b> Aerodynamics aside, I’m curious what tactical
 advantage you’re expecting to gain by having the high
 explosive fly back at you if it misses the target.<br>
 </div>
 </div>
 <br>
------------------------------------------------------------------------------<br>
 <br>
 _______________________________________________<br>
 Matplotlib-users mailing list<br>
 <a moz-do-not-send="true"
 href="mailto:Mat...@li...">Mat...@li...</a><br>
 <a moz-do-not-send="true"
 href="https://lists.sourceforge.net/lists/listinfo/matplotlib-users"
 target="_blank">https://lists.sourceforge.net/lists/listinfo/matplotlib-users</a><br>
 <br>
 </blockquote>
 </div>
 </blockquote>
 <br>
 <br>
 <div class="moz-signature">-- <br>
 <b>Q:</b> What if you strapped C4 to a boomerang? Could this be an
 effective weapon, or would it be as stupid as it sounds?<br>
 <b>A:</b> Aerodynamics aside, I’m curious what tactical advantage
 you’re expecting to gain by having the high explosive fly back at
 you if it misses the target.<br>
 </div>
 </body>
</html>
From: Jody K. <jk...@uv...> - 2015年06月08日 21:26:56
Hi Ben,
My idea was to just make the notebook the "example". But nbconvert-ing the notebook makes static images that then need to be checked into the repository, and take space, so I wasn’t sure how desirable that was. 
It would be fun to have the documentation script accept ipython notebooks and run nbconvert on them. Being able to save state as you work through examples is quite nice, versus creating five or six standalone *.py files that then get run at build time. Of course you are adding a dependency to anyone who has wants to build the docs. 
Thanks, Jody
> On 8 Jun 2015, at 13:35 PM, Benjamin Root <ben...@ou...> wrote:
> 
> No, there isn't an accepted way to do that AFAIK. However, it doesn't seem like it is all that far off. Our doc-build process will create the images from the examples automatically, so you don't need to include the image tag. It is sort of a way to make sure the examples work and that the image matches the code correctly.
> 
> On Mon, Jun 8, 2015 at 1:06 PM, Jody Klymak <jk...@uv... <mailto:jk...@uv...>> wrote:
> 
> Hi all,
> 
> If I want to contribute *.rst files to the matplotlib documentation, I can see a few styles already contributed, at least one of which makes extensive use of ipython (http://matplotlib.org/users/image_tutorial.html <http://matplotlib.org/users/image_tutorial.html>). However, even it makes use of `.. sourcecode:: python` and `.. plot::` blocks.
> 
> If I convert an ipython notebook to rst, it formats as: `.. code:: python` and instead of making plots it loads images:
> `.. image:: MyExample_files/MyExample_1_0.png`
> 
> So, is there an acceptable way to directly make matplotlib documentation directly from a notebook? I didn’t see anything, but wanted to check, as that would by far be the easiest way to make a *.rst that had structured text, code, and plots.
> 
> Thanks, Jody
> 
> --
> Jody Klymak
> http://web.uvic.ca/~jklymak/ <http://web.uvic.ca/~jklymak/>
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li... <mailto:Mat...@li...>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users <https://lists.sourceforge.net/lists/listinfo/matplotlib-users>
> 
--
Jody Klymak 
http://web.uvic.ca/~jklymak/
From: Benjamin R. <ben...@ou...> - 2015年06月08日 20:36:05
No, there isn't an accepted way to do that AFAIK. However, it doesn't seem
like it is all that far off. Our doc-build process will create the images
from the examples automatically, so you don't need to include the image
tag. It is sort of a way to make sure the examples work and that the image
matches the code correctly.
On Mon, Jun 8, 2015 at 1:06 PM, Jody Klymak <jk...@uv...> wrote:
>
> Hi all,
>
> If I want to contribute *.rst files to the matplotlib documentation, I can
> see a few styles already contributed, at least one of which makes extensive
> use of ipython (http://matplotlib.org/users/image_tutorial.html).
> However, even it makes use of `.. sourcecode:: python` and `.. plot::`
> blocks.
>
> If I convert an ipython notebook to rst, it formats as: `.. code:: python`
> and instead of making plots it loads images:
> `.. image:: MyExample_files/MyExample_1_0.png`
>
> So, is there an acceptable way to directly make matplotlib documentation
> directly from a notebook? I didn’t see anything, but wanted to check, as
> that would by far be the easiest way to make a *.rst that had structured
> text, code, and plots.
>
> Thanks, Jody
>
> --
> Jody Klymak
> http://web.uvic.ca/~jklymak/
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Benjamin R. <ben...@ou...> - 2015年06月08日 20:32:50
By the way, if you want quick-n-easy plotting of shapefiles, I suggest
using GeoPandas, which makes it dead simple.
On Mon, Jun 8, 2015 at 1:49 PM, Ronquillo, Edgar Nahum <ero...@la...>
wrote:
> Hello,
> I am currently working with Basemap to plot a shapefile on the map.
> However, I am confused on how to initialize llcrnrx and llcrnry and same
> for the upper corner. I currently have both latitudes and longitudes for
> lower and upper corners in degrees. Does this mean I have to convert from
> degrees to x,y coordinates? I tried using llcrnrlon and llcrnrlat but it
> doesn't seem to like this. Please help me clarify this, any help would be
> great.
>
> Thank You
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Paul H. <pmh...@gm...> - 2015年06月08日 19:29:09
Edgar,
You feed lat/lon (float) values. See this example here:
http://matplotlib.org/basemap/users/cea.html
And a whole collection of setting up maps in other projection here:
http://matplotlib.org/basemap/users/mapsetup.html
You also need to make sure that all of inputs make sense together (e.g.,
you're not specifying any corners beyond the range of your specific
projection)
-p
On Mon, Jun 8, 2015 at 10:49 AM, Ronquillo, Edgar Nahum <ero...@la...
> wrote:
> Hello,
> I am currently working with Basemap to plot a shapefile on the map.
> However, I am confused on how to initialize llcrnrx and llcrnry and same
> for the upper corner. I currently have both latitudes and longitudes for
> lower and upper corners in degrees. Does this mean I have to convert from
> degrees to x,y coordinates? I tried using llcrnrlon and llcrnrlat but it
> doesn't seem to like this. Please help me clarify this, any help would be
> great.
>
> Thank You
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Ronquillo, E. N. <ero...@la...> - 2015年06月08日 17:49:32
Hello,
I am currently working with Basemap to plot a shapefile on the map. However, I am confused on how to initialize llcrnrx and llcrnry and same for the upper corner. I currently have both latitudes and longitudes for lower and upper corners in degrees. Does this mean I have to convert from degrees to x,y coordinates? I tried using llcrnrlon and llcrnrlat but it doesn't seem to like this. Please help me clarify this, any help would be great.
Thank You
From: Jody K. <jk...@uv...> - 2015年06月08日 17:07:01
Hi all,
If I want to contribute *.rst files to the matplotlib documentation, I can see a few styles already contributed, at least one of which makes extensive use of ipython (http://matplotlib.org/users/image_tutorial.html). However, even it makes use of `.. sourcecode:: python` and `.. plot::` blocks.
If I convert an ipython notebook to rst, it formats as: `.. code:: python` and instead of making plots it loads images:
 `.. image:: MyExample_files/MyExample_1_0.png`
So, is there an acceptable way to directly make matplotlib documentation directly from a notebook? I didn’t see anything, but wanted to check, as that would by far be the easiest way to make a *.rst that had structured text, code, and plots.
Thanks, Jody
--
Jody Klymak 
http://web.uvic.ca/~jklymak/
From: Jan H. <jan...@gm...> - 2015年06月08日 08:51:31
Attachments: distributions.png
I put the data into a list of lists of numpy arrays. The following script
generated a plot similar to what Juan attached:
import matplotlib.pyplot as plt
import numpy as np
def model(t, ii, jj):
 """
 Returns some numbers according to the independent variable, t, and
 parameters of the model, ii and jj.
 """
 return (jj*6+ii)*np.ones_like(t)
### generate data (i.e. model + some random values)
t = np.linspace(-2.5, 2.5, 11)
data = [
 [model(t, ii, jj) + np.random.rand(len(t)) - .5
 for ii in range(6)] # different sessions
 for jj in range(2)] # accuracy/speed
### do the plotting
colors = ['b', 'r']
titles = ['Accuracy emphasis', 'Speed emphasis']
fig, big_axes = plt.subplots(figsize=(16, 6), nrows=2, ncols=1, sharey=True)
for row, big_ax in enumerate(big_axes):
 big_ax.set_ylabel('RT distributions')
 big_ax.set_xlabel('Response time [s]')
 big_ax.set_title(titles[row])
 big_ax.tick_params(labelcolor=(1.,1.,1.,0.), top='off', bottom='off',
left='off', right='off')
 big_ax._frameon = False
for jj, emph_data in enumerate(data):
 for ii, iidata in enumerate(emph_data):
 ax = fig.add_subplot(len(data), len(emph_data),
jj*len(emph_data)+ii+1)
 # plot bars:
 ax.bar(t, iidata,
 color=colors[jj],
 width=(max(t)-min(t))/(len(t)-1), # for non-overlapping bars
 linewidth=0) # no outlines
 # plot models:
 ax.plot(t, model(t, ii, jj), 'k', linewidth=2)
 # annotate axes etc.
 ax.set_xticks((-2.5, 0., 2.5))
 ax.set_ylim((-.1, 12.8))
 ax.annotate('Session {}'.format(ii+1), xy=(-2.4, 11.8))
plt.tight_layout()
plt.show()
How to add the centered titles for each row is described here :
http://stackoverflow.com/questions/27426668/row-titles-for-matplotlib-subplot
Jan
On 8 June 2015 at 03:27, Paul Hobson <pmh...@gm...> wrote:
> (apologies if the list receives this twice)
>
> On Fri, Jun 5, 2015 at 9:14 AM, Juan Wu <wuj...@gm...> wrote:
>>
>>> Hi, Experts,
>>>
>>> My colleagues and I have a question, how we can make a plot via python
>>> like below. According to a guy's original paper, "Each panel shows the
>>> normalized histograms of the observed data (bar plots) and the model
>>> prediction (black lines) ".
>>>
>>> I believe that people can make it with Matplotlib. Any code suggestion
>>> (with simple example data) would be much appreciated.
>>>
>>> (I am more comfortable with Matlab, but now the python code is
>>> preferred).
>>>
>>> J
>>>
>>
>
> Juan,
>
> It is, of course, very difficult to give any concrete advice without
> knowing how your data are stored.
>
> In any case, seaborn builds on matplotlib to provide some very advanced
> visualization with a very concise API.
>
> I recommend you look into the seaborn.distplot function and
> seaborn.FacetGrid class.
> http://web.stanford.edu/~mwaskom/software/seaborn/
>
> -Paul
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Paul H. <pmh...@gm...> - 2015年06月08日 01:27:36
(apologies if the list receives this twice)
On Fri, Jun 5, 2015 at 9:14 AM, Juan Wu <wuj...@gm...> wrote:
>
>> Hi, Experts,
>>
>> My colleagues and I have a question, how we can make a plot via python
>> like below. According to a guy's original paper, "Each panel shows the
>> normalized histograms of the observed data (bar plots) and the model
>> prediction (black lines) ".
>>
>> I believe that people can make it with Matplotlib. Any code suggestion
>> (with simple example data) would be much appreciated.
>>
>> (I am more comfortable with Matlab, but now the python code is preferred).
>>
>> J
>>
>
Juan,
It is, of course, very difficult to give any concrete advice without
knowing how your data are stored.
In any case, seaborn builds on matplotlib to provide some very advanced
visualization with a very concise API.
I recommend you look into the seaborn.distplot function and
seaborn.FacetGrid class.
http://web.stanford.edu/~mwaskom/software/seaborn/
-Paul
On 2015年06月07日 12:05 PM, Nathaniel Smith wrote:
> On Sun, Jun 7, 2015 at 2:37 PM, Eric Firing <ef...@ha...> wrote:
>> Matplotlib's pyplot retains quite a few vestiges from its original
>> Matlab-workalike heritage; we would like to gradually eliminate those
>> that no longer make sense. One such candidate is the "hold" kwarg that
>> every pyplot function has, with a "True" default. I don't think it
>> serves any useful purpose now, and getting rid of it would allow
>> considerable simplification to the code and, to a lesser extent, the
>> documentation. The default behavior would not change, only the ability
>> to change that behavior via either the rcParams['axes.hold'] parameter
>> or the "hold" kwarg in a pyplot function call.
>>
>> If you routinely use 'hold=False' and believe that removing it would be
>> a mistake, please let us know.
>
> I do actually use it with some regularity interactively, though I'm
> not particularly attached to it. Is there some equivalent though, like
> plt.whatever(..., hold=False)
> can become
> plt.clear(); plt.whatever(...)
It's exactly equivalent to:
	plt.cla(); plt.whatever(...)
> ? The semantics would be that the current figure remains the current
> figure, but is reset so that the next operation starts from scratch. I
> notice that plt.clear() does not exist, but maybe it has another
> spelling :-).
There are two types of "clear":
	plt.clf() # clear the current Figure
	plt.cla() # clear the current Axes
Eric
>
> (Basically the use case here is getting something like the
> edit-and-rerun-a-cell workflow, but when using a classic interactive
> REPL rather than the ipython notebook -- so I have a specific plot
> window up on my screen at a size and place where I can see it, and
> maybe some other plots in other windows in the background somewhere,
> and I want to quickly display different things into that window.)
>
> -n
>
From: Nathaniel S. <nj...@po...> - 2015年06月07日 22:05:42
On Sun, Jun 7, 2015 at 2:37 PM, Eric Firing <ef...@ha...> wrote:
> Matplotlib's pyplot retains quite a few vestiges from its original
> Matlab-workalike heritage; we would like to gradually eliminate those
> that no longer make sense. One such candidate is the "hold" kwarg that
> every pyplot function has, with a "True" default. I don't think it
> serves any useful purpose now, and getting rid of it would allow
> considerable simplification to the code and, to a lesser extent, the
> documentation. The default behavior would not change, only the ability
> to change that behavior via either the rcParams['axes.hold'] parameter
> or the "hold" kwarg in a pyplot function call.
>
> If you routinely use 'hold=False' and believe that removing it would be
> a mistake, please let us know.
I do actually use it with some regularity interactively, though I'm
not particularly attached to it. Is there some equivalent though, like
 plt.whatever(..., hold=False)
can become
 plt.clear(); plt.whatever(...)
? The semantics would be that the current figure remains the current
figure, but is reset so that the next operation starts from scratch. I
notice that plt.clear() does not exist, but maybe it has another
spelling :-).
(Basically the use case here is getting something like the
edit-and-rerun-a-cell workflow, but when using a classic interactive
REPL rather than the ipython notebook -- so I have a specific plot
window up on my screen at a size and place where I can see it, and
maybe some other plots in other windows in the background somewhere,
and I want to quickly display different things into that window.)
-n
-- 
Nathaniel J. Smith -- http://vorpus.org
From: Paul H. <pmh...@gm...> - 2015年06月07日 21:43:30
Attachments: image.png
Juan,
It is, of course, very difficult to give any concrete advice without
knowing how your data are stored.
In any case, seaborn builds on matplotlib to provide some very advanced
visualization through very concise code.
I recommend you look into the seaborn.distplot function and
seaborn,FacetGrid class.
http://web.stanford.edu/~mwaskom/software/seaborn/
-Paul
On Fri, Jun 5, 2015 at 9:14 AM, Juan Wu <wuj...@gm...> wrote:
> Hi, Experts,
>
> My colleagues and I have a question, how we can make a plot via python
> like below. According to a guy's original paper, "Each panel shows the
> normalized histograms of the observed data (bar plots) and the model
> prediction (black lines) ".
>
> I believe that people can make it with Matplotlib. Any code suggestion
> (with simple example data) would be much appreciated.
>
> (I am more comfortable with Matlab, but now the python code is preferred).
>
> J
>
>
> [image: Inline image 3]
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Eric F. <ef...@ha...> - 2015年06月07日 21:37:51
Matplotlib's pyplot retains quite a few vestiges from its original 
Matlab-workalike heritage; we would like to gradually eliminate those 
that no longer make sense. One such candidate is the "hold" kwarg that 
every pyplot function has, with a "True" default. I don't think it 
serves any useful purpose now, and getting rid of it would allow 
considerable simplification to the code and, to a lesser extent, the 
documentation. The default behavior would not change, only the ability 
to change that behavior via either the rcParams['axes.hold'] parameter 
or the "hold" kwarg in a pyplot function call.
If you routinely use 'hold=False' and believe that removing it would be 
a mistake, please let us know.
Thanks.
Eric
From: Bryan W. <bry...@gm...> - 2015年06月07日 20:44:23
If you have pip installed, installing six is simple:
pip install six
Hope that helps! :)
On 6/7/2015 3:57 PM, aureta wrote:
> Hi, I had Matplotlib installed and working in my PC. I decided to uninstall
> it using the control panel software uninstall option and install it again.
> This time when I run the VIDLE using the import matplot.pyplot as plt
> sentence I get the following message:
>
> Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
> on win32
> Type "copyright", "credits" or "license()" for more information.
>>>> ================================ RESTART
>>>> ================================
>>>>
> Traceback (most recent call last):
> File "Untitled", line 1
> import matplotlib.pyplot as plt
> File "C:\Python27\Lib\site-packages\matplotlib\__init__.py", line 105
> import six
> ImportError: No module named six
>
>
> --
> View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-import-Error-tp45741.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: aureta <ale...@gm...> - 2015年06月07日 20:01:44
 Hi, I had Matplotlib installed and working in my PC. I decided to uninstall
 it using the control panel software uninstall option and install it again.
 This time when I run the VIDLE using the import matplot.pyplot as plt
 sentence I get the following message:
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART
>>> ================================
>>> 
Traceback (most recent call last):
 File "Untitled", line 1
 import matplotlib.pyplot as plt
 File "C:\Python27\Lib\site-packages\matplotlib\__init__.py", line 105
 import six
ImportError: No module named six
>>> 
Can someone help me in getting Matplotlib working again? Thanks...
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/MatplotLib-Import-Error-tp45742.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: aureta <ale...@gm...> - 2015年06月07日 19:57:13
Hi, I had Matplotlib installed and working in my PC. I decided to uninstall
it using the control panel software uninstall option and install it again.
 This time when I run the VIDLE using the import matplot.pyplot as plt
 sentence I get the following message:
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART
>>> ================================
>>> 
Traceback (most recent call last):
 File "Untitled", line 1
 import matplotlib.pyplot as plt
 File "C:\Python27\Lib\site-packages\matplotlib\__init__.py", line 105
 import six
ImportError: No module named six
>>> 
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-import-Error-tp45741.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Showing results of 124

<< < 1 2 3 4 5 > >> (Page 3 of 5)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /