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
|
|
From: Benjamin R. <ben...@ou...> - 2014-09-08 13:20:06
|
You will need to be more specific... much more specific. What kind of plot are you making? How big is your data? What version of matplotlib are you using? How much RAM do you have available compared to the amount of data (most slowdowns are actually due to swap-thrashing issues). Matplotlib can be used for large data, but there exists some speciality tools for the truly large datasets. The solution depends on the situation. Ben Root On Mon, Sep 8, 2014 at 7:45 AM, Raffaele Quarta <raf...@li...> wrote: > Hi, > > I'm working with NetCDF format. When I try to make a plot of very large > file, I have to wait for a long time for plotting. How can I solve this? > Isn't there a solution for this problem? > > Raffaele > > -- > This email was Virus checked by Astaro Security Gateway. http://www.sophos.com > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Raffaele Q. <raf...@li...> - 2014-09-08 11:46:20
|
Hi, I'm working with NetCDF format. When I try to make a plot of very large file, I have to wait for a long time for plotting. How can I solve this? Isn't there a solution for this problem? Raffaele -- This email was Virus checked by Astaro Security Gateway. http://www.sophos.com |
|
From: Pierre H. <pie...@cr...> - 2014-09-08 10:23:53
|
Le 05/09/2014 21:53, Arnaldo Russo a écrit : > The following code plots my table, but greek letters are not in Arial. What about adding greek letters directly with a Unicode string and keeping LaTex only for the table? best, Pierre (my greek and math unicode "copy-pasting files" attached) |
|
From: Ken M. <ma...@gm...> - 2014-09-08 02:28:31
|
Hi, I'm having trouble with Basemap South Pole Stereographic projections. The required "boundinglat" doesn't seem to work properly, and I hope someone can help me figure out the correct syntax. I have the following information about the data: extent: -3,333,500 to 3,333,500 m true scale latitude: -71 south pole stereographic projection. Given this, I try the following: m = Basemap(resolution='c',projection='spstere', lat_ts=-71,lat_0=0.,lon_0=0.) And it crashes reporting that I need boundinglat. I can't give width/height which are accepted by the 'stere' projection. I use http://www.pgc.umn.edu/tools/conversion and determine that 3333500 is 60 degrees south. If then add "boundinglat=-60" to the Basemap call, the data appears nowhere near the correct location. If I add "boundinglat=-89.999999" it looks almost perfect. If I change that to "-90" or add a few more 9's, it crashes. Am I determining the bounding lat correctly from the provided information? Should I be calling Basemap differently? Any help will be much appreciated. Thanks, Ken Mankoff |
|
From: Mannucci, A. J (335G) <ant...@jp...> - 2014-09-07 21:21:43
|
I have studied how to make floating axes with curvilinear grids. However, I cannot figure out how to achieve my desired goals.
The code snippet below is a distillation that takes me part-way there. I cannot seem to access/modify the radial tick labels and their locations.
I am plotting data in a latitude/longitude coordinate system. I am converting latitude to the radial coordinate, and longitude is the angular coordinate. My plot extends from 90 degrees latitude (= zero radius) to 50 degrees latitude (=cos(50) radius). The figure appears like a pie wedge, with the point of the pie pointing down and the circular part of the wedge at the top.I can easily translate the data into radius/angle coordinates for the plotting.
What I cannot figure out is how to change the radial axis labels. I want these to go from 90 to 50. That is, coordinate 0 should have the label "90", and coordinate 50 should have the label "50". Since I am not versed in the various low-level artists, I cannot figure out how to change the axis labels. By default, the tick labels run from 0 to 50.
In the code below, I manipulate the object called ax1.axis["left"]. I can toggle the labels on and off, and whether there is a text label. However, I cannot figure out how to set the tick labels and where they are located. In all the examples I've seen online, defaults axes labels are used, so I don't know how to do this. I have searched the documentation but cannot find a function that allows me to set tick labels and their locations. In the pylab interface, this can be done, e.g. with ax.set_xticks and ax.set_xticklabels. I don't know how to do this without the pylab interface.
Help is appreciated! Thank you.
=======================
import numpy as np
import matplotlib.pyplot as plt
import mpl_toolkits.axisartist.floating_axes as floating_axes
from matplotlib.projections import PolarAxes
from matplotlib.transforms import Affine2D
fig = plt.figure()
tr_rotate = Affine2D().translate(30, 0)
tr_scale = Affine2D().scale(np.pi/180., 1.)
tr = tr_rotate + tr_scale + PolarAxes.PolarTransform()
grid_helper = floating_axes.GridHelperCurveLinear( tr, extremes=( 0, 120,
0.0, 50.0), tick_formatter1 = None, tick_formatter2 = None )
ax1 = floating_axes.FloatingSubplot( fig, 111, grid_helper=grid_helper )
# adjust axis
ax1.axis["left"].set_axis_direction("bottom")
ax1.axis["right"].set_axis_direction("top")
ax1.axis["bottom"].set_visible(False)
ax1.axis["top"].set_axis_direction("bottom")
ax1.axis["top"].toggle(ticklabels=False, label=False)
ax1.axis["left"].toggle(ticklabels=False, label=False) # This is radial axis, outside.
ax1.axis["top"].major_ticklabels.set_axis_direction("top")
ax1.axis["top"].label.set_axis_direction("top")
a = ax1.axis["left"]
a.toggle(ticklabels=True, label=True)
a.label.set_text("Magnetic Latitude")
aux_ax = ax1.get_aux_axes(tr)
aux_ax.patch = ax1.patch
fig.add_subplot( ax1 )
aux_ax.plot([55.0, 55.0, 65.0, 45.0], [45., 30.0, 10., 20.], marker='o', ls='')
ax1.grid( True )
plt.show()
=======================
-Tony
--
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
Mail-Stop 138-308, Tel > (818) 354-1699
Jet Propulsion Laboratory, Fax > (818) 393-5115
California Institute of Technology, Email > Ton...@jp...
4800 Oak Grove Drive, http://scienceandtechnology.jpl.nasa.gov/people/a_mannucci/
Pasadena, CA 91109
|
|
From: Oliver <oli...@gm...> - 2014-09-07 11:30:06
|
pyplot.gca().set_xlim([0, 10]) 2014-09-07 13:20 GMT+02:00 Albert Yiamakis <vki...@gm...>: > Hello, > > When creating a simple plot with > > xs = [0.01*x for x in range(1000)] > ys = [x*x for x in xs] > pyplot.fill_between(xs, ys) > > The plot shows between x=0 and x=10, as expected. > However, when looking to fill between 2 and 8, in this way: > > b = [False if x<2 or x>8 else True for x in xs] > pyplot.fill_between(xs, ys, where=b) > > Then the plot shows between x=0 and x=8. Is there a way to get it to show > up to x=10? Thanks, > > Albert > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Albert Y. <vki...@gm...> - 2014-09-07 11:20:39
|
Hello, When creating a simple plot with xs = [0.01*x for x in range(1000)] ys = [x*x for x in xs] pyplot.fill_between(xs, ys) The plot shows between x=0 and x=10, as expected. However, when looking to fill between 2 and 8, in this way: b = [False if x<2 or x>8 else True for x in xs] pyplot.fill_between(xs, ys, where=b) Then the plot shows between x=0 and x=8. Is there a way to get it to show up to x=10? Thanks, Albert |
|
From: fizix137 <fiz...@gm...> - 2014-09-07 01:34:47
|
My full question is in stack overflow. Basically I want to add an image of a flag into each of the wedges of a pie chart. The wedges will never be smaller than 1/8 of the pie so the flag should always fit nicely. I can't figure out how to get an image to be inside a wedge. That's what I need help with. Thanks! http://stackoverflow.com/questions/25596938/matplotlib-applying-an-image-as-the-background-of-a-matplotlib-wedge -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Get-an-image-into-a-wedge-of-a-pie-chart-tp43899.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Arnaldo R. <arn...@gm...> - 2014-09-06 20:01:33
|
Hi Tobi and others,
I have tested include other packages (e.g \usepackage{cmbright} ), but it
seems to not solve my problem.
Including on matplotlibrc, exactly the lines as you said, my output is the
same as I have attached (Matplotlib To.png).
On pure LaTex, I really don't know how it should be charged. I have tried
this:
\documentclass{report}
\usepackage{fontspec}\setmainfont{Arial}\setmathrm{Arial}\setmathsf{Arial}\setmathtt{Arial}\usepackage{amsmath}
\begin{document}
$\mu$text $\eta$text $\cdot$ m$^{-2}$ s$^{-1}$
\end{document}
Thanks
---
*Arnaldo D'Amaral Pereira Granja Russo*
Lab. de Estudos dos Oceanos e Clima
Instituto de Oceanografia - FURG
2014-09-06 6:19 GMT-03:00 Tobias Winchen <to...@wi...>:
> Hi,
>
> On Friday 05 September 2014 16:53:47 Arnaldo Russo wrote:
> > I'm trying to figure out how I could use greek letters on axis labels,
> > without italic.
> > I have read a lot about alternatives, but I do need to use LaTeX to
> insert
> > a table inside the plot area.
>
> I use the sfmath package together with the sans-serif latex fonts in
> matplotlib. The relevant lines in my matplotlibrc are:
>
> font.family : sans-serif
> font.serif : Computer Modern Roman, Times, Palatino,
> font.sans-serif : Computer Modern Sans serif, Helvetica, Avant Garde,
> font.cursive : Zapf Chancery
> font.monospace : Courier, Computer Modern Typewriter
>
> text.latex.unicode : True
> text.latex.preamble : \usepackage{lmodern},\usepackage{sfmath},
> \usepackage{amsmath}, \usepackage{amssymb}, \usepackage{siunitx},
>
> This should do what you want?
>
> Best regards,
>
>
> Tobi
>
|
|
From: Sterling S. <sm...@fu...> - 2014-09-05 20:50:09
|
When I wanted to make my math text in a LaTeX beamer presentation upright, I added the following to my beamer style file:
%%Attempt to get upright math symbols
\AtBeginDocument{
\DeclareSymbolFont{pureletters}{\encodingdefault}{\mathfamilydefault}{m}{n}
\SetMathAlphabet{\mathrm}{normal}{\encodingdefault}{\rmdefault}{m}{n}
\DeclareMathAlphabet{\mathbf}{\encodingdefault}{\mathfamilydefault}{bx}{n}
\DeclareMathAlphabet{\mathsf}{\encodingdefault}{\sfdefault}{m}{n}
\DeclareMathAlphabet{\mathit}{\encodingdefault}{\mathfamilydefault}{m}{it}
\DeclareMathAlphabet{\mathtt}{\encodingdefault}{\ttdefault}{m}{n}
\ifx\mv at bold\@undefined\else
\SetSymbolFont{numbers}{bold}{\encodingdefault}{\mathfamilydefault}{bx}{n}
\SetSymbolFont{pureletters}{bold}{\encodingdefault}{\mathfamilydefault}{bx}{n}
\SetMathAlphabet{\mathrm}{bold}{\encodingdefault}{\rmdefault}{bx}{n}
\SetMathAlphabet{\mathbf}{bold}{\encodingdefault}{\mathfamilydefault}{bx}{n}
\SetMathAlphabet{\mathsf}{bold}{\encodingdefault}{\sfdefault}{bx}{n}
\SetMathAlphabet{\mathit}{bold}{\encodingdefault}{\mathfamilydefault}{bx}{it}
\SetMathAlphabet{\mathtt}{bold}{\encodingdefault}{\ttdefault}{bx}{n}
\fi
\def\operator at font{\mathgroup\symnumbers}
\DeclareMathSymbol{0}\mathalpha{numbers}{"30}
\DeclareMathSymbol{1}\mathalpha{numbers}{"31}
\DeclareMathSymbol{2}\mathalpha{numbers}{"32}
\DeclareMathSymbol{3}\mathalpha{numbers}{"33}
\DeclareMathSymbol{4}\mathalpha{numbers}{"34}
\DeclareMathSymbol{5}\mathalpha{numbers}{"35}
\DeclareMathSymbol{6}\mathalpha{numbers}{"36}
\DeclareMathSymbol{7}\mathalpha{numbers}{"37}
\DeclareMathSymbol{8}\mathalpha{numbers}{"38}
\DeclareMathSymbol{9}\mathalpha{numbers}{"39}
\DeclareMathSymbol{A}\mathalpha{pureletters}{"41}
\DeclareMathSymbol{B}\mathalpha{pureletters}{"42}
\DeclareMathSymbol{C}\mathalpha{pureletters}{"43}
\DeclareMathSymbol{D}\mathalpha{pureletters}{"44}
\DeclareMathSymbol{E}\mathalpha{pureletters}{"45}
\DeclareMathSymbol{F}\mathalpha{pureletters}{"46}
\DeclareMathSymbol{G}\mathalpha{pureletters}{"47}
\DeclareMathSymbol{H}\mathalpha{pureletters}{"48}
\DeclareMathSymbol{I}\mathalpha{pureletters}{"49}
\DeclareMathSymbol{J}\mathalpha{pureletters}{"4A}
\DeclareMathSymbol{K}\mathalpha{pureletters}{"4B}
\DeclareMathSymbol{L}\mathalpha{pureletters}{"4C}
\DeclareMathSymbol{M}\mathalpha{pureletters}{"4D}
\DeclareMathSymbol{N}\mathalpha{pureletters}{"4E}
\DeclareMathSymbol{O}\mathalpha{pureletters}{"4F}
\DeclareMathSymbol{P}\mathalpha{pureletters}{"50}
\DeclareMathSymbol{Q}\mathalpha{pureletters}{"51}
\DeclareMathSymbol{R}\mathalpha{pureletters}{"52}
\DeclareMathSymbol{S}\mathalpha{pureletters}{"53}
\DeclareMathSymbol{T}\mathalpha{pureletters}{"54}
\DeclareMathSymbol{U}\mathalpha{pureletters}{"55}
\DeclareMathSymbol{V}\mathalpha{pureletters}{"56}
\DeclareMathSymbol{W}\mathalpha{pureletters}{"57}
\DeclareMathSymbol{X}\mathalpha{pureletters}{"58}
\DeclareMathSymbol{Y}\mathalpha{pureletters}{"59}
\DeclareMathSymbol{Z}\mathalpha{pureletters}{"5A}
\DeclareMathSymbol{a}\mathalpha{pureletters}{"61}
\DeclareMathSymbol{b}\mathalpha{pureletters}{"62}
\DeclareMathSymbol{c}\mathalpha{pureletters}{"63}
\DeclareMathSymbol{d}\mathalpha{pureletters}{"64}
\DeclareMathSymbol{e}\mathalpha{pureletters}{"65}
\DeclareMathSymbol{f}\mathalpha{pureletters}{"66}
\DeclareMathSymbol{g}\mathalpha{pureletters}{"67}
\DeclareMathSymbol{h}\mathalpha{pureletters}{"68}
\DeclareMathSymbol{i}\mathalpha{pureletters}{"69}
\DeclareMathSymbol{j}\mathalpha{pureletters}{"6A}
\DeclareMathSymbol{k}\mathalpha{pureletters}{"6B}
\DeclareMathSymbol{l}\mathalpha{pureletters}{"6C}
\DeclareMathSymbol{m}\mathalpha{pureletters}{"6D}
\DeclareMathSymbol{n}\mathalpha{pureletters}{"6E}
\DeclareMathSymbol{o}\mathalpha{pureletters}{"6F}
\DeclareMathSymbol{p}\mathalpha{pureletters}{"70}
\DeclareMathSymbol{q}\mathalpha{pureletters}{"71}
\DeclareMathSymbol{r}\mathalpha{pureletters}{"72}
\DeclareMathSymbol{s}\mathalpha{pureletters}{"73}
\DeclareMathSymbol{t}\mathalpha{pureletters}{"74}
\DeclareMathSymbol{u}\mathalpha{pureletters}{"75}
\DeclareMathSymbol{v}\mathalpha{pureletters}{"76}
\DeclareMathSymbol{w}\mathalpha{pureletters}{"77}
\DeclareMathSymbol{x}\mathalpha{pureletters}{"78}
\DeclareMathSymbol{y}\mathalpha{pureletters}{"79}
\DeclareMathSymbol{z}\mathalpha{pureletters}{"7A}
}
I don't know if that helps here. Perhaps you would add this to rcParams['latex.preamble'], which was always advertised as being experimental. (You may need to preface it with \makeatletter, and end with \makeatother.)
-Sterling
On Sep 5, 2014, at 1:21PM, Paul Hobson wrote:
> How do you do this in a normal LaTeX document?
>
>
> On Fri, Sep 5, 2014 at 12:53 PM, Arnaldo Russo <arn...@gm...> wrote:
> Hi,
>
> I'm trying to figure out how I could use greek letters on axis labels, without italic.
> I have read a lot about alternatives, but I do need to use LaTeX to insert a table inside the plot area.
>
> Using mathtex it responds with normal font on greek letters.
>
> What I`m doing wrong?
>
> The following code plots my table, but greek letters are not in Arial.
>
> import
> numpy as np
>
> import matplotlib.
> pyplot as plt
>
> t2
> = np.arange(100)
>
> fig
> = plt.figure(figsize=(8,4))
>
> ax
> = fig.add_subplot(111)
>
>
> plt
> .rcParams.update({'font.family' : 'sans-serif',
>
>
> 'font.sans-serif' : 'Arial',
>
>
> 'font.style' : 'normal',
>
>
> 'xtick.labelsize' : 12,
>
>
> 'ytick.labelsize' : 12,
>
>
> 'mathtext.fontset' : 'stixsans',
>
>
> 'mathtext.default': 'regular',
>
>
> 'mathtext.tt' : 'Arial',
>
>
> })
>
> plt
> .subplots_adjust(left=0.12, right=0.95, top=0.95, bottom=0.1)
>
>
>
> ax
> .set_xlim(0,100)
>
> xvals
> = [0, 16.6, 33.33, 50, 66.66, 83.33, 100]
>
> ax
> .set_xticks(xvals)
>
> ax
> .set_xticklabels(['tick 0', 'tick 1', 'tick 2','tick 3', 'tick 4', 'tick 5', 'tick 6'])
>
> ax
> .set_ylabel(r'$\mu$text $\eta$text $\cdot$ m$^{-2}$ s$^{-1}$')
>
> ax
> .set_yticklabels(['0', '200', '400', '600', '800', '1000', '1200', '1400'])
>
> ax
> .plot(t2, color='black')
>
> ax
> .fill_between(np.arange(0, len(t2)),t2,0, color='black', alpha=0.8)
>
>
>
>
> from matplotlib import
> rc
> rc
> ('font',**{'family':'sans-serif','sans-serif':['Arial']})
>
> rc
> ('text', usetex=True)
>
> table
> = r'''\begin{tabular}{lccccccc}\hline&tick 0& tick 1 & tick 2 & tick 3 & tick 4 & tick 5 & tick 6 \\\hline Vals & 32.00 & 3.28 & 5.80 & 5 & 8 & 45 & 7.3 \\\hline \end{tabular}'''
>
> plt
> .text(20,80,table,size=10)
>
>
> plt
> .show()
>
> And an example using Mathtex, using regular fonts work out of the box, but my table of course is included as plain text. I have to close my IPython session and start it again to correct usage of plot parameters.
>
> import
> numpy as np
>
> import matplotlib.
> pyplot as plt
>
> t2
> = np.arange(100)
>
> fig
> = plt.figure(figsize=(8,4))
>
> ax
> = fig.add_subplot(111)
>
>
> plt
> .rcParams.update({'xtick.labelsize' : 12,
>
>
> 'ytick.labelsize' : 12,
>
>
> 'mathtext.fontset' : 'stixsans',
>
>
> 'mathtext.default': 'regular',
>
>
> 'mathtext.tt' : 'Arial',
>
>
> })
>
> plt
> .subplots_adjust(left=0.12, right=0.95, top=0.95, bottom=0.1)
>
>
>
> ax
> .set_xlim(0,100)
>
> xvals
> = [0, 16.6, 33.33, 50, 66.66, 83.33, 100]
>
> ax
> .set_xticks(xvals)
>
> ax
> .set_xticklabels(['tick 0', 'tick 1', 'tick 2','tick 3', 'tick 4', 'tick 5', 'tick 6'])
>
> ax
> .set_ylabel(r'$\mu$text $\eta$text $\cdot$ m$^{-2}$ s$^{-1}$')
>
> ax
> .set_yticklabels(['0', '200', '400', '600', '800', '1000', '1200', '1400'])
>
> ax
> .plot(t2, color='black')
>
> ax
> .fill_between(np.arange(0, len(t2)),t2,0, color='black', alpha=0.8)
>
>
>
> #from matplotlib import rc
> #rc('font',**{'family':'sans-serif','sans-serif':['Arial']})
> #rc('text', usetex=True)
>
> table
> = r'''\begin{tabular}{lccccccc}\hline&tick 0& tick 1 & tick 2 & tick 3 & tick 4 & tick 5 & tick 6 \\\hline Vals & 32.00 & 3.28 & 5.80 & 5 & 8 & 45 & 7.3 \\\hline \end{tabular}'''
>
> plt
> .text(20,80,table,size=10)
>
>
> plt
> .show()
>
> Regards,
> Arnaldo.
>
> ---
> Arnaldo D'Amaral Pereira Granja Russo
> Lab. de Estudos dos Oceanos e Clima
> Instituto de Oceanografia - FURG
>
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/_______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Paul H. <pmh...@gm...> - 2014-09-05 20:21:44
|
How do you do this in a normal LaTeX document?
On Fri, Sep 5, 2014 at 12:53 PM, Arnaldo Russo <arn...@gm...>
wrote:
> Hi,
>
> I'm trying to figure out how I could use greek letters on axis labels,
> without italic.
> I have read a lot about alternatives, but I do need to use LaTeX to insert
> a table inside the plot area.
>
> Using mathtex it responds with normal font on greek letters.
>
> What I`m doing wrong?
>
> The following code plots my table, but greek letters are not in Arial.
>
> import numpy as npimport matplotlib.pyplot as plt
>
> t2 = np.arange(100)
> fig = plt.figure(figsize=(8,4))
> ax = fig.add_subplot(111)
>
> plt.rcParams.update({'font.family' : 'sans-serif',
> 'font.sans-serif' : 'Arial',
> 'font.style' : 'normal',
> 'xtick.labelsize' : 12,
> 'ytick.labelsize' : 12,
> 'mathtext.fontset' : 'stixsans',
> 'mathtext.default': 'regular',
> 'mathtext.tt' : 'Arial',
> })
> plt.subplots_adjust(left=0.12, right=0.95, top=0.95, bottom=0.1)
>
>
> ax.set_xlim(0,100)
> xvals = [0, 16.6, 33.33, 50, 66.66, 83.33, 100]
> ax.set_xticks(xvals)
> ax.set_xticklabels(['tick 0', 'tick 1', 'tick 2','tick 3', 'tick 4', 'tick 5', 'tick 6'])
> ax.set_ylabel(r'$\mu$text $\eta$text $\cdot$ m$^{-2}$ s$^{-1}$')
> ax.set_yticklabels(['0', '200', '400', '600', '800', '1000', '1200', '1400'])
> ax.plot(t2, color='black')
> ax.fill_between(np.arange(0, len(t2)),t2,0, color='black', alpha=0.8)
>
> from matplotlib import rc
> rc('font',**{'family':'sans-serif','sans-serif':['Arial']})
> rc('text', usetex=True)
> table = r'''\begin{tabular}{lccccccc}\hline&tick 0& tick 1 & tick 2 & tick 3 & tick 4 & tick 5 & tick 6 \\\hline Vals & 32.00 & 3.28 & 5.80 & 5 & 8 & 45 & 7.3 \\\hline \end{tabular}'''
> plt.text(20,80,table,size=10)
>
> plt.show()
>
>
> And an example using Mathtex, using regular fonts work out of the box, but
> my table of course is included as plain text. I have to close my IPython
> session and start it again to correct usage of plot parameters.
>
> import numpy as npimport matplotlib.pyplot as plt
>
> t2 = np.arange(100)
> fig = plt.figure(figsize=(8,4))
> ax = fig.add_subplot(111)
>
> plt.rcParams.update({'xtick.labelsize' : 12,
> 'ytick.labelsize' : 12,
> 'mathtext.fontset' : 'stixsans',
> 'mathtext.default': 'regular',
> 'mathtext.tt' : 'Arial',
> })
> plt.subplots_adjust(left=0.12, right=0.95, top=0.95, bottom=0.1)
>
>
> ax.set_xlim(0,100)
> xvals = [0, 16.6, 33.33, 50, 66.66, 83.33, 100]
> ax.set_xticks(xvals)
> ax.set_xticklabels(['tick 0', 'tick 1', 'tick 2','tick 3', 'tick 4', 'tick 5', 'tick 6'])
> ax.set_ylabel(r'$\mu$text $\eta$text $\cdot$ m$^{-2}$ s$^{-1}$')
> ax.set_yticklabels(['0', '200', '400', '600', '800', '1000', '1200', '1400'])
> ax.plot(t2, color='black')
> ax.fill_between(np.arange(0, len(t2)),t2,0, color='black', alpha=0.8)
> #from matplotlib import rc#rc('font',**{'family':'sans-serif','sans-serif':['Arial']})#rc('text', usetex=True)
> table = r'''\begin{tabular}{lccccccc}\hline&tick 0& tick 1 & tick 2 & tick 3 & tick 4 & tick 5 & tick 6 \\\hline Vals & 32.00 & 3.28 & 5.80 & 5 & 8 & 45 & 7.3 \\\hline \end{tabular}'''
> plt.text(20,80,table,size=10)
>
> plt.show()
>
>
> Regards,
> Arnaldo.
>
> ---
> *Arnaldo D'Amaral Pereira Granja Russo*
> Lab. de Estudos dos Oceanos e Clima
> Instituto de Oceanografia - FURG
>
>
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Arnaldo R. <arn...@gm...> - 2014-09-05 19:54:27
|
Hi,
I'm trying to figure out how I could use greek letters on axis labels,
without italic.
I have read a lot about alternatives, but I do need to use LaTeX to insert
a table inside the plot area.
Using mathtex it responds with normal font on greek letters.
What I`m doing wrong?
The following code plots my table, but greek letters are not in Arial.
import numpy as npimport matplotlib.pyplot as plt
t2 = np.arange(100)
fig = plt.figure(figsize=(8,4))
ax = fig.add_subplot(111)
plt.rcParams.update({'font.family' : 'sans-serif',
'font.sans-serif' : 'Arial',
'font.style' : 'normal',
'xtick.labelsize' : 12,
'ytick.labelsize' : 12,
'mathtext.fontset' : 'stixsans',
'mathtext.default': 'regular',
'mathtext.tt' : 'Arial',
})
plt.subplots_adjust(left=0.12, right=0.95, top=0.95, bottom=0.1)
ax.set_xlim(0,100)
xvals = [0, 16.6, 33.33, 50, 66.66, 83.33, 100]
ax.set_xticks(xvals)
ax.set_xticklabels(['tick 0', 'tick 1', 'tick 2','tick 3', 'tick 4',
'tick 5', 'tick 6'])
ax.set_ylabel(r'$\mu$text $\eta$text $\cdot$ m$^{-2}$ s$^{-1}$')
ax.set_yticklabels(['0', '200', '400', '600', '800', '1000', '1200', '1400'])
ax.plot(t2, color='black')
ax.fill_between(np.arange(0, len(t2)),t2,0, color='black', alpha=0.8)
from matplotlib import rc
rc('font',**{'family':'sans-serif','sans-serif':['Arial']})
rc('text', usetex=True)
table = r'''\begin{tabular}{lccccccc}\hline&tick 0& tick 1 & tick 2 &
tick 3 & tick 4 & tick 5 & tick 6 \\\hline Vals & 32.00 & 3.28 & 5.80
& 5 & 8 & 45 & 7.3 \\\hline \end{tabular}'''
plt.text(20,80,table,size=10)
plt.show()
And an example using Mathtex, using regular fonts work out of the box, but
my table of course is included as plain text. I have to close my IPython
session and start it again to correct usage of plot parameters.
import numpy as npimport matplotlib.pyplot as plt
t2 = np.arange(100)
fig = plt.figure(figsize=(8,4))
ax = fig.add_subplot(111)
plt.rcParams.update({'xtick.labelsize' : 12,
'ytick.labelsize' : 12,
'mathtext.fontset' : 'stixsans',
'mathtext.default': 'regular',
'mathtext.tt' : 'Arial',
})
plt.subplots_adjust(left=0.12, right=0.95, top=0.95, bottom=0.1)
ax.set_xlim(0,100)
xvals = [0, 16.6, 33.33, 50, 66.66, 83.33, 100]
ax.set_xticks(xvals)
ax.set_xticklabels(['tick 0', 'tick 1', 'tick 2','tick 3', 'tick 4',
'tick 5', 'tick 6'])
ax.set_ylabel(r'$\mu$text $\eta$text $\cdot$ m$^{-2}$ s$^{-1}$')
ax.set_yticklabels(['0', '200', '400', '600', '800', '1000', '1200', '1400'])
ax.plot(t2, color='black')
ax.fill_between(np.arange(0, len(t2)),t2,0, color='black', alpha=0.8)
#from matplotlib import
rc#rc('font',**{'family':'sans-serif','sans-serif':['Arial']})#rc('text',
usetex=True)
table = r'''\begin{tabular}{lccccccc}\hline&tick 0& tick 1 & tick 2 &
tick 3 & tick 4 & tick 5 & tick 6 \\\hline Vals & 32.00 & 3.28 & 5.80
& 5 & 8 & 45 & 7.3 \\\hline \end{tabular}'''
plt.text(20,80,table,size=10)
plt.show()
Regards,
Arnaldo.
---
*Arnaldo D'Amaral Pereira Granja Russo*
Lab. de Estudos dos Oceanos e Clima
Instituto de Oceanografia - FURG
|
|
From: David P. <dp...@ny...> - 2014-09-04 21:37:32
|
NumPy, SciPy, MatPlotLib Users & Science teachers: I have written an introduction to scientific python that you may find useful. You can download it from GitHub and use it freely: https://github.com/djpine/pyman I wrote this manual/book for undergraduates taking science and engineering courses that use programming to solve science and engineering problems. It is not for experts. I am sharing it with the hope that others may find it useful. It includes an introduction to very basic programming, numpy, matplotlib, & scipy, as well as instructions on how to download and install Python and these three libraries. It also includes an introduction to IPython notebooks. Corrections and suggestions for improvements are welcome. David Pine |
|
From: Eric F. <ef...@ha...> - 2014-09-01 06:42:51
|
On 2014/08/31, 6:48 PM, John Ladasky wrote: > Hi folks, > > I am trying to install Matplotlib 1.4.0 on an older laptop, running > Ubuntu 12.04. I am committed to Python 3. In the standard Ubuntu > repositories, python3-matplotlib (of any version) is unavailable until > Ubuntu 13.04. > > My first instinct would be to upgrade to a more current Ubuntu > revision. However, when I tried to upgrade Ubuntu, I received a warning > that the Unity3D GUI was probably too heavy-weight for my machine. My recommendation is to switch to Xubuntu 14.04 if/when you can manage the disruption of doing a clean installation. > Traceback (most recent call last): > File "setup.py", line 154, in <module> > result = package.check() > File "/home/john/Desktop/matplotlib-1.4.0/setupext.py", line 940, in > check > if 'No such file or directory\ngrep:' in version: > TypeError: argument of type 'NoneType' is not iterable > This is a bug in 1.4.0 that has been fixed in 1.4.x. Eric |
|
From: John L. <joh...@sb...> - 2014-09-01 06:36:50
|
On 08/31/2014 09:48 PM, John Ladasky wrote: > Hi folks, > > I am trying to install Matplotlib 1.4.0 on an older laptop, running > Ubuntu 12.04. I am committed to Python 3. In the standard Ubuntu > repositories, python3-matplotlib (of any version) is unavailable until > Ubuntu 13.04. [snip] OK. Problem solved. I succeeded in building and installing Matplotlib. It looks like I don't have any backends installed, but I'll fix that next. I had freetype12 installed, but NOT freetype-dev. I figured this out by looking at the source code of setupext.py. Ordinarily I get more descriptive error messages when a Matplotlib build fails. Even if they're coming from the C++ compiler, I get the name of the file which triggered the error, and it is usually related to the name of the broken package. |
|
From: John L. <joh...@sb...> - 2014-09-01 04:48:37
|
Hi folks, I am trying to install Matplotlib 1.4.0 on an older laptop, running Ubuntu 12.04. I am committed to Python 3. In the standard Ubuntu repositories, python3-matplotlib (of any version) is unavailable until Ubuntu 13.04. My first instinct would be to upgrade to a more current Ubuntu revision. However, when I tried to upgrade Ubuntu, I received a warning that the Unity3D GUI was probably too heavy-weight for my machine. I have read the matplotlib 1.4.0 documentation and, according to the dependencies information contained there, it looks like I should be able to get matplotlib 1.4.0 to run on my machine if I take the trouble to install the dependencies manually. I have done this before, on other machines. I thought that I followed the directions (http://matplotlib.org/users/installing.html) correctly. I believe that I have installed all the required dependencies, and I have even installed some of the optional ones I do not need. Something is still wrong. Here's my latest build error log from the console: xxxx@xxxxxxxxxx:~/Desktop/matplotlib-1.4.0$ python3 setup.py build ============================================================================ Edit setup.cfg to change the build options BUILDING MATPLOTLIB matplotlib: yes [1.4.0] python: yes [3.2.3 (default, Feb 27 2014, 21:33:50) [GCC 4.6.3]] platform: yes [linux2] REQUIRED DEPENDENCIES AND EXTENSIONS numpy: yes [version 1.6.1] six: yes [using six version 1.7.3] dateutil: yes [using dateutil version 2.0] tornado: yes [using tornado version 2.1] pyparsing: yes [using pyparsing version 2.0.2] pycxx: yes [Official versions of PyCXX are not compatible with Python 3.x. Using local copy] libagg: yes [pkg-config information for 'libagg' could not be found. Using local copy.] Traceback (most recent call last): File "setup.py", line 154, in <module> result = package.check() File "/home/john/Desktop/matplotlib-1.4.0/setupext.py", line 940, in check if 'No such file or directory\ngrep:' in version: TypeError: argument of type 'NoneType' is not iterable The "required dependencies and extensions" section appears to be incomplete. I am expecting to see the installer check for freetype and png next. It never gets there. A Python TypeError is being generated. My first thought would be that I have a Py2/Py3 compatibility issue, and I would immediately think of the _six_ package as the source of the problem. But maybe it's something else? Any advice would be appreciated. Thanks. |
|
From: Remo G. <su...@li...> - 2014-08-31 09:05:33
|
Thanks for your answer.
I don't have any problems with other packages. It's just basemap. I
tried a fresh virtualenv with just numpy, scipy, and matplotlib
installed. But the installation of basemap fails.
I also tried with mpl 1.3.1. Same problem.
It may be specific to Ubuntu 14.04. I'll talk to my colleagues who use
other OS's.
Remo
On 30.08.2014 20:42, Benjamin Root wrote:
> This doesn't "feel" like a basemap/matplotlib problem. Something seems
> very wrong with your environment. You aren't having any problems with
> installing/upgrading other packages the same way?
>
> Could you try a fresh virtual environment, perhaps?
>
> Ben Root
>
>
> On Sat, Aug 30, 2014 at 8:48 AM, Remo Goetschi <su...@li...
> <mailto:su...@li...>> wrote:
>
> Dear all,
>
> It seems that installing basemap through
> pip install basemap --allow-external basemap --allow-unverified basemap
> fails with Matplotlib 1.4, both on Python 2.7 and 3.4. This used to work
> without problems.
> I attached the Python 2.7 and 3.4 tracebacks below.
> Does anybody have an idea on how to fix this?
>
> Operating system: Ubuntu 14.04, 64 bit.
>
> Cheers,
> Remo
>
>
> Python 3 error:
>
> Cleaning up...
> Removing temporary dir /home/rg/venv_all_py3/build...
> Command /home/rg/venv_all_py3/bin/python3 -c "import setuptools,
> tokenize;__file__='/home/rg/venv_all_py3/build/basemap/setup.py';exec(compile(getattr(tokenize,
> 'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
> 'exec'))" install --record /tmp/pip-9ae5z_xw-record/install-record.txt
> --single-version-externally-managed --compile --install-headers
> /home/rg/venv_all_py3/include/site/python3.4 failed with error code 1 in
> /home/rg/venv_all_py3/build/basemap
> Exception information:
> Traceback (most recent call last):
> File
> "/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/basecommand.py",
> line 122, in main
> status = self.run(options, args)
> File
> "/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/commands/install.py",
> line 283, in run
> requirement_set.install(install_options, global_options,
> root=options.root_path)
> File "/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/req.py",
> line 1435, in install
> requirement.install(install_options, global_options, *args,
> **kwargs)
> File "/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/req.py",
> line 706, in install
> cwd=self.source_dir, filter_stdout=self._filter_install,
> show_stdout=False)
> File "/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/util.py",
> line 697, in call_subprocess
> % (command_desc, proc.returncode, cwd))
> pip.exceptions.InstallationError: Command
> /home/rg/venv_all_py3/bin/python3 -c "import setuptools,
> tokenize;__file__='/home/rg/venv_all_py3/build/basemap/setup.py';exec(compile(getattr(tokenize,
> 'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
> 'exec'))" install --record /tmp/pip-9ae5z_xw-record/install-record.txt
> --single-version-externally-managed --compile --install-headers
> /home/rg/venv_all_py3/include/site/python3.4 failed with error code 1 in
> /home/rg/venv_all_py3/build/basemap
>
> Python 2.7 error:
>
> Cleaning up...
> Command /home/rg/venv_all/bin/python -c "import setuptools,
> tokenize;__file__='/home/rg/venv_all/build/basemap/setup.py';exec(compile(getattr(tokenize,
> 'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
> 'exec'))" install --record /tmp/pip-gtWsT6-record/install-record.txt
> --single-version-externally-managed --compile --install-headers
> /home/rg/venv_all/include/site/python2.7 failed with error code 1 in
> /home/rg/venv_all/build/basemap
> Traceback (most recent call last):
> File "/home/rg/venv_all/bin/pip", line 11, in <module>
> sys.exit(main())
> File
> "/home/rg/venv_all/local/lib/python2.7/site-packages/pip/__init__.py",
> line 185, in main
> return command.main(cmd_args)
> File
> "/home/rg/venv_all/local/lib/python2.7/site-packages/pip/basecommand.py",
> line
> 161, in main
> text = '\n'.join(complete_log)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 59:
> ordinal not in range(128)
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> <mailto:Mat...@li...>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Benjamin R. <ben...@ou...> - 2014-08-30 18:42:37
|
This doesn't "feel" like a basemap/matplotlib problem. Something seems very
wrong with your environment. You aren't having any problems with
installing/upgrading other packages the same way?
Could you try a fresh virtual environment, perhaps?
Ben Root
On Sat, Aug 30, 2014 at 8:48 AM, Remo Goetschi <su...@li...> wrote:
> Dear all,
>
> It seems that installing basemap through
> pip install basemap --allow-external basemap --allow-unverified basemap
> fails with Matplotlib 1.4, both on Python 2.7 and 3.4. This used to work
> without problems.
> I attached the Python 2.7 and 3.4 tracebacks below.
> Does anybody have an idea on how to fix this?
>
> Operating system: Ubuntu 14.04, 64 bit.
>
> Cheers,
> Remo
>
>
> Python 3 error:
>
> Cleaning up...
> Removing temporary dir /home/rg/venv_all_py3/build...
> Command /home/rg/venv_all_py3/bin/python3 -c "import setuptools,
>
> tokenize;__file__='/home/rg/venv_all_py3/build/basemap/setup.py';exec(compile(getattr(tokenize,
> 'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
> 'exec'))" install --record /tmp/pip-9ae5z_xw-record/install-record.txt
> --single-version-externally-managed --compile --install-headers
> /home/rg/venv_all_py3/include/site/python3.4 failed with error code 1 in
> /home/rg/venv_all_py3/build/basemap
> Exception information:
> Traceback (most recent call last):
> File
> "/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/basecommand.py",
> line 122, in main
> status = self.run(options, args)
> File
>
> "/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/commands/install.py",
> line 283, in run
> requirement_set.install(install_options, global_options,
> root=options.root_path)
> File "/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/req.py",
> line 1435, in install
> requirement.install(install_options, global_options, *args, **kwargs)
> File "/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/req.py",
> line 706, in install
> cwd=self.source_dir, filter_stdout=self._filter_install,
> show_stdout=False)
> File "/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/util.py",
> line 697, in call_subprocess
> % (command_desc, proc.returncode, cwd))
> pip.exceptions.InstallationError: Command
> /home/rg/venv_all_py3/bin/python3 -c "import setuptools,
>
> tokenize;__file__='/home/rg/venv_all_py3/build/basemap/setup.py';exec(compile(getattr(tokenize,
> 'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
> 'exec'))" install --record /tmp/pip-9ae5z_xw-record/install-record.txt
> --single-version-externally-managed --compile --install-headers
> /home/rg/venv_all_py3/include/site/python3.4 failed with error code 1 in
> /home/rg/venv_all_py3/build/basemap
>
> Python 2.7 error:
>
> Cleaning up...
> Command /home/rg/venv_all/bin/python -c "import setuptools,
>
> tokenize;__file__='/home/rg/venv_all/build/basemap/setup.py';exec(compile(getattr(tokenize,
> 'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
> 'exec'))" install --record /tmp/pip-gtWsT6-record/install-record.txt
> --single-version-externally-managed --compile --install-headers
> /home/rg/venv_all/include/site/python2.7 failed with error code 1 in
> /home/rg/venv_all/build/basemap
> Traceback (most recent call last):
> File "/home/rg/venv_all/bin/pip", line 11, in <module>
> sys.exit(main())
> File
> "/home/rg/venv_all/local/lib/python2.7/site-packages/pip/__init__.py",
> line 185, in main
> return command.main(cmd_args)
> File
> "/home/rg/venv_all/local/lib/python2.7/site-packages/pip/basecommand.py",
> line
> 161, in main
> text = '\n'.join(complete_log)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 59:
> ordinal not in range(128)
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Remo G. <su...@li...> - 2014-08-30 12:48:27
|
Dear all,
It seems that installing basemap through
pip install basemap --allow-external basemap --allow-unverified basemap
fails with Matplotlib 1.4, both on Python 2.7 and 3.4. This used to work
without problems.
I attached the Python 2.7 and 3.4 tracebacks below.
Does anybody have an idea on how to fix this?
Operating system: Ubuntu 14.04, 64 bit.
Cheers,
Remo
Python 3 error:
Cleaning up...
Removing temporary dir /home/rg/venv_all_py3/build...
Command /home/rg/venv_all_py3/bin/python3 -c "import setuptools,
tokenize;__file__='/home/rg/venv_all_py3/build/basemap/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
'exec'))" install --record /tmp/pip-9ae5z_xw-record/install-record.txt
--single-version-externally-managed --compile --install-headers
/home/rg/venv_all_py3/include/site/python3.4 failed with error code 1 in
/home/rg/venv_all_py3/build/basemap
Exception information:
Traceback (most recent call last):
File
"/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/basecommand.py",
line 122, in main
status = self.run(options, args)
File
"/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/commands/install.py",
line 283, in run
requirement_set.install(install_options, global_options,
root=options.root_path)
File "/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/req.py",
line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/req.py",
line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install,
show_stdout=False)
File "/home/rg/venv_all_py3/lib/python3.4/site-packages/pip/util.py",
line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command
/home/rg/venv_all_py3/bin/python3 -c "import setuptools,
tokenize;__file__='/home/rg/venv_all_py3/build/basemap/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
'exec'))" install --record /tmp/pip-9ae5z_xw-record/install-record.txt
--single-version-externally-managed --compile --install-headers
/home/rg/venv_all_py3/include/site/python3.4 failed with error code 1 in
/home/rg/venv_all_py3/build/basemap
Python 2.7 error:
Cleaning up...
Command /home/rg/venv_all/bin/python -c "import setuptools,
tokenize;__file__='/home/rg/venv_all/build/basemap/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
'exec'))" install --record /tmp/pip-gtWsT6-record/install-record.txt
--single-version-externally-managed --compile --install-headers
/home/rg/venv_all/include/site/python2.7 failed with error code 1 in
/home/rg/venv_all/build/basemap
Traceback (most recent call last):
File "/home/rg/venv_all/bin/pip", line 11, in <module>
sys.exit(main())
File
"/home/rg/venv_all/local/lib/python2.7/site-packages/pip/__init__.py",
line 185, in main
return command.main(cmd_args)
File
"/home/rg/venv_all/local/lib/python2.7/site-packages/pip/basecommand.py", line
161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 59:
ordinal not in range(128)
|
|
From: Benjamin R. <ben...@ou...> - 2014-08-29 13:28:43
|
slaps forehead... Joe, you just won the "duh!" moment of the month award! Cheers! Ben Root On Thu, Aug 28, 2014 at 10:18 PM, Joe Kington <jof...@gm...> wrote: > Why not just use boolean indexing? > > E.g. to find the region that falls between 5 and 10, do "(z >=5) & (z <= > 10)": > > In [1]: import numpy as np > > In [2]: x, y = np.mgrid[-10:10, -10:10] > > In [3]: z = np.hypot(x, y) > > In [4]: result = (z >= 5) & (z <= 10) > > In [5]: result.astype(int) > Out[5]: > array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], > [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], > [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0], > [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0], > [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], > [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], > [0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], > [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], > [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], > [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], > [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0], > [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0], > [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]]) > > Cheers, > -Joe > > > > On Thu, Aug 28, 2014 at 8:23 PM, Eric Firing <ef...@ha...> wrote: > >> On 2014/08/28, 3:02 AM, Matthew Czesarski wrote: >> > Hi Matplotlib Users! >> > >> > >> > >> > I have some 2-d arrays, which i am displaying with implot, and deriving >> > contours for with contour. Easy - I'm just pulling them out of >> > collections[0].get_paths() . >> > >> > However what's not easy is that I would like to recover a 1-0 or >> > True-False array of the array values (pixels) that fall within the >> > contours. Some line crossing algorithm/floodfill could do it, but I >> > guess that matplotlib's fill() or contourf() must do this under the hood >> > anyway. I've looked into the output both functions, but I don't see >> > anything obvious.. >> > >> > Does anybody know if there's an a way to pull out a such an array from >> > matplotlib? Any pointers are appreciated! >> >> Make an array of (x, y) pairs from the X and Y you use in your call to >> contour, and then feed that array to the contains_points() method of >> your contour Path. This will give you the desired Boolean array for any >> given Path; depending on what you want, you might need to combine arrays >> for more than one Path. >> >> To get closed paths, I think you will want to use contourf, not contour. >> >> Eric >> >> >> >> > >> > Cheers, >> > Matt >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Slashdot TV. >> > Video for Nerds. Stuff that matters. >> > http://tv.slashdot.org/ >> > >> > >> > >> > _______________________________________________ >> > Matplotlib-users mailing list >> > Mat...@li... >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > >> >> >> >> ------------------------------------------------------------------------------ >> Slashdot TV. >> Video for Nerds. Stuff that matters. >> http://tv.slashdot.org/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Sterling S. <sm...@fu...> - 2014-08-29 05:19:03
|
Joe and list, This is off topic, but can you point me to good documentation on the use of '&' as opposed to numpy.logical_and ? Thanks, Sterling On Aug 28, 2014, at 7:18PM, Joe Kington wrote: > Why not just use boolean indexing? > > E.g. to find the region that falls between 5 and 10, do "(z >=5) & (z <= 10)": > > In [1]: import numpy as np > > In [2]: x, y = np.mgrid[-10:10, -10:10] > > In [3]: z = np.hypot(x, y) > > In [4]: result = (z >= 5) & (z <= 10) > > In [5]: result.astype(int) > Out[5]: > array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], > [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], > [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0], > [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0], > [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], > [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], > [0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], > [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], > [0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], > [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], > [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], > [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0], > [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0], > [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]]) > > Cheers, > -Joe > > > > On Thu, Aug 28, 2014 at 8:23 PM, Eric Firing <ef...@ha...> wrote: > On 2014/08/28, 3:02 AM, Matthew Czesarski wrote: > > Hi Matplotlib Users! > > > > > > > > I have some 2-d arrays, which i am displaying with implot, and deriving > > contours for with contour. Easy - I'm just pulling them out of > > collections[0].get_paths() . > > > > However what's not easy is that I would like to recover a 1-0 or > > True-False array of the array values (pixels) that fall within the > > contours. Some line crossing algorithm/floodfill could do it, but I > > guess that matplotlib's fill() or contourf() must do this under the hood > > anyway. I've looked into the output both functions, but I don't see > > anything obvious.. > > > > Does anybody know if there's an a way to pull out a such an array from > > matplotlib? Any pointers are appreciated! > > Make an array of (x, y) pairs from the X and Y you use in your call to > contour, and then feed that array to the contains_points() method of > your contour Path. This will give you the desired Boolean array for any > given Path; depending on what you want, you might need to combine arrays > for more than one Path. > > To get closed paths, I think you will want to use contourf, not contour. > > Eric > > > > > > > Cheers, > > Matt > > > > > > ------------------------------------------------------------------------------ > > Slashdot TV. > > Video for Nerds. Stuff that matters. > > http://tv.slashdot.org/ > > > > > > > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Joe K. <jof...@gm...> - 2014-08-29 02:18:27
|
Why not just use boolean indexing?
E.g. to find the region that falls between 5 and 10, do "(z >=5) & (z <=
10)":
In [1]: import numpy as np
In [2]: x, y = np.mgrid[-10:10, -10:10]
In [3]: z = np.hypot(x, y)
In [4]: result = (z >= 5) & (z <= 10)
In [5]: result.astype(int)
Out[5]:
array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0],
[0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],
[0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
[0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
[0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],
[0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],
[0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],
[0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],
[0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],
[0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],
[0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],
[0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],
[0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
[0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
[0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],
[0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]])
Cheers,
-Joe
On Thu, Aug 28, 2014 at 8:23 PM, Eric Firing <ef...@ha...> wrote:
> On 2014/08/28, 3:02 AM, Matthew Czesarski wrote:
> > Hi Matplotlib Users!
> >
> >
> >
> > I have some 2-d arrays, which i am displaying with implot, and deriving
> > contours for with contour. Easy - I'm just pulling them out of
> > collections[0].get_paths() .
> >
> > However what's not easy is that I would like to recover a 1-0 or
> > True-False array of the array values (pixels) that fall within the
> > contours. Some line crossing algorithm/floodfill could do it, but I
> > guess that matplotlib's fill() or contourf() must do this under the hood
> > anyway. I've looked into the output both functions, but I don't see
> > anything obvious..
> >
> > Does anybody know if there's an a way to pull out a such an array from
> > matplotlib? Any pointers are appreciated!
>
> Make an array of (x, y) pairs from the X and Y you use in your call to
> contour, and then feed that array to the contains_points() method of
> your contour Path. This will give you the desired Boolean array for any
> given Path; depending on what you want, you might need to combine arrays
> for more than one Path.
>
> To get closed paths, I think you will want to use contourf, not contour.
>
> Eric
>
>
>
> >
> > Cheers,
> > Matt
> >
> >
> >
> ------------------------------------------------------------------------------
> > Slashdot TV.
> > Video for Nerds. Stuff that matters.
> > http://tv.slashdot.org/
> >
> >
> >
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Eric F. <ef...@ha...> - 2014-08-29 01:23:30
|
On 2014/08/28, 3:02 AM, Matthew Czesarski wrote: > Hi Matplotlib Users! > > > > I have some 2-d arrays, which i am displaying with implot, and deriving > contours for with contour. Easy - I'm just pulling them out of > collections[0].get_paths() . > > However what's not easy is that I would like to recover a 1-0 or > True-False array of the array values (pixels) that fall within the > contours. Some line crossing algorithm/floodfill could do it, but I > guess that matplotlib's fill() or contourf() must do this under the hood > anyway. I've looked into the output both functions, but I don't see > anything obvious.. > > Does anybody know if there's an a way to pull out a such an array from > matplotlib? Any pointers are appreciated! Make an array of (x, y) pairs from the X and Y you use in your call to contour, and then feed that array to the contains_points() method of your contour Path. This will give you the desired Boolean array for any given Path; depending on what you want, you might need to combine arrays for more than one Path. To get closed paths, I think you will want to use contourf, not contour. Eric > > Cheers, > Matt > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Benjamin R. <ben...@ou...> - 2014-08-28 13:43:03
|
No reason why it shouldn't. I would be more than happy to see that feature added. I could perhaps be convinced that it is a "bug" that it is in the boxplot function and not the violin function so that it could get out into a 1.4.1 release sooner. ::wink:: On Thu, Aug 28, 2014 at 8:05 AM, Neal Becker <ndb...@gm...> wrote: > As others noted, seaborn does very nice violin plots. I was hoping the > mpl version would replace that. > > > On Thu, Aug 28, 2014 at 8:04 AM, Thomas Caswell <tca...@gm...> > wrote: > >> We also welcome PRs! Adding that feature should be pretty straight >> forward. >> >> Iirc it should be a matter of adding an extra key to the dictionary and a >> conditional to draw the lines if those keys exist. >> >> Tom >> On Aug 27, 2014 4:57 PM, "Arnaldo Russo" <arn...@gm...> wrote: >> >>> Hi Neal, >>> I don't know if you need exclusively matplotlib tools to apply your >>> violin plot, but seaborn package [1, 2] do this very well. >>> I hope you enjoy it! >>> Cheers, >>> Arnaldo. >>> >>> [1] >>> http://web.stanford.edu/~mwaskom/software/seaborn/examples/violinplots.html >>> [2] https://github.com/mwaskom/seaborn >>> >>> >>> --- >>> *Arnaldo D'Amaral Pereira Granja Russo* >>> Lab. de Estudos dos Oceanos e Clima >>> Instituto de Oceanografia - FURG >>> >>> >>> >>> >>> 2014-08-27 12:15 GMT-03:00 Neal Becker <ndb...@gm...>: >>> >>>> I'm pleased to see violinplot added to mpl-1.4. One question. I might >>>> like to >>>> annotate with some statistic. Like boxplot can show quantiles. I >>>> might like to >>>> show either quantiles, or some other statistic (3 sigma) on my >>>> violinplot. >>>> After all, violinplot is advertised as an improved boxplot, but it >>>> seems to be >>>> missing this feature. >>>> >>>> -- >>>> -- Those who don't understand recursion are doomed to repeat it >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Slashdot TV. >>>> Video for Nerds. Stuff that matters. >>>> http://tv.slashdot.org/ >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Slashdot TV. >>> Video for Nerds. Stuff that matters. >>> http://tv.slashdot.org/ >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >>> > > > -- > *Those who don't understand recursion are doomed to repeat it* > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Benjamin R. <ben...@ou...> - 2014-08-28 13:33:54
|
You are asking for the twinx() feature: http://matplotlib.org/examples/api/two_scales.html On Thu, Aug 28, 2014 at 9:24 AM, Shantha Kumara <shk...@in...> wrote: > Hi All, > > Thank you so much for your help, It really worked for me. > > > I need one more favor, > > > I have ploted the graph with 2 Y-axes > > Here is the code > > lns1 = ax1.plot(x1, y1, 'r-o',label=LY1,markersize=4) > ax1 = self.set_ylim(ax1,y1,label=LY1) > lns2 = ax2.plot(x2, y2, 'b-o',label=LY2,markersize=4) > > I want to set the grid to the second y-axes in the same graph. > > Please help on the same. > > See here the difference > > (Embedded image moved to file: pic19302.gif) > > > > SHANTHA KUMARA REVANASIDDAPPA > Python Developper > Operations & Production Control, A1 Telekom > IBM > M +43-6642196132 > @ Sha...@ex... > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |