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



Showing results of 339

<< < 1 .. 9 10 11 12 13 14 > >> (Page 11 of 14)
From: Blake, J. <Jam...@nu...> - 2011年11月08日 16:12:59
Dear MPL gurus,
I've probably failed to RTFM properly. 
I'm trying to produce error bars with horizontal lines at the top of the
vertical error bars to cap them. I've tried adjusting capsize on both
plt.bar and plt.errorbar, but have not had any success. I think I had
this working previously with 1.0.1, but can't remember for definite.
Matplotlib: 1.1.0
Python version: 2.7.2
IPython: 0.11
Windows XP 32 bit
Many thanks for any pointers, and apologies if I have missed an obvious
setting.
James
=== begin example code ===
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
X = np.array([.5,1.5,2.5,3.5])
Y = np.array([1,2,3,4])
dY = np.array([.1,.2,.3,.4])
f = plt.figure()
ax = f.add_subplot(111)
A = plt.bar(X, Y, yerr=dY, ecolor='red', capsize=10)
A[0].set_facecolor('black')
A[1].set_facecolor('gray')
A[2].set_facecolor('black')
A[3].set_facecolor('gray')
ax.set_xlim([0.,4.8])
plt.show()
******************************************************************************************************************** 
This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.
Thank you for your co-operation.
******************************************************************************************************************** 
This email has been processed by SmoothZap - www.smoothwall.net
From: Michael D. <md...@st...> - 2011年11月08日 15:42:33
For speed in the Agg backend the markers are drawn once and then copied 
as rasters to all of their positions. This implies that the markers end 
up pixel aligned, which is the source of the error you're seeing. This 
does not happen in the vector backends.
If you want to not get this behavior, you can use scatter() instead of 
plot().
Mike
On 11/07/2011 04:00 PM, Anton Daitche wrote:
> Hi,
>
> As I remember from an earlier discussion on this, it's assumed that
> these small deviations are tolerable in the agg renderer. This makes
> the interactive backends more responsive at expenses of accuracy.
>
>
> Do you remember the name of the thread? I would like to understand the 
> details on this.
> I also would like to find out if i can force the renderer to do exact 
> drawing (at some computational cost).
>
> I can see the same deviations using the tkagg backend with mpl 1.1.0
> but if I save as pdf using the save button I get an accurate rendering
> (see attachment).
>
>
> I can verify this. Thanks for pointing this out.
>
> With best regards
> Anton
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save 700ドル by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Michael D. <md...@st...> - 2011年11月08日 13:36:04
Unfortunately, the matplotlib mathtext renderer does not support 
\begin{array} (or any of the \begin{}/\end{} tags for that matter). 
You'll probably want to experiment with one of the other math plugins 
for sphinx described here:
http://sphinx.pocoo.org/ext/math.html
Mike
On 11/08/2011 05:54 AM, info wrote:
> Hi,
> first of all, thanks for matplotlib!
> Then, the question. After reading this
> http://matplotlib.sourceforge.net/sampledoc/extensions.html
> I've tried to use something like:
>
> .. math::
>
> \left| \begin{array}{cc} x_{11} & x_{12} \\ x_{21} & x_{22} 
> \end{array} \right|
>
>
> but it doesn't work.
> Can you help me?
>
> Thanks,
> Manuel
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save 700ドル by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Yoshi R. <yo...@ro...> - 2011年11月08日 11:54:49
+----------------------------- Yoshi Rokuko -----------+
> this works in principle, but however i can't increase
> the size of the grid.
> 
> even if i try something like:
> 
> fig = plt.figure(1, (15,18))
> fig.subplots_adjust(left=0.01, bottom=0.01,
> right=0.99, top=0.99)
> grid = AxesGrid(fig, 132,
> nrows_ncols = (2, 2),
> axes_pad = 0.1,
> cbar_location = "top",
> cbar_mode="single",
> )
> i get a small grid in the center with lots of white
> space around.
here is an example of what i mean:
 http://rokuko.net/to-small.png
best regards, yoshi
PS
done with:
fig = plt.figure(1, (15,25))
fig.subplots_adjust(left=0.1, bottom=0.1,
 right=.9, top=.9)
grid = AxesGrid(fig, 132,
 nrows_ncols = (3, 2),
 axes_pad = 0.1,
 cbar_location = "top",
 cbar_mode="single",
 )
for ax in grid:
 <...>
grid.cbar_axes[0].colorbar(im)
plt.savefig('to-small.png')
From: info <in...@ma...> - 2011年11月08日 11:21:24
Hi,
first of all, thanks for matplotlib!Then, the question. After reading this
 
http://matplotlib.sourceforge.net/sampledoc/extensions.html
 
I've tried to use something like: 
.. math::  \left| \begin{array}{cc} x_{11} & x_{12} \\ x_{21} & x_{22} \end{array} \right|but it doesn't work. 
Can you help me?Thanks,
 
Manuel 
 
 
From: Mads I. <mad...@gm...> - 2011年11月08日 10:49:27
Hi,
Thanks to the help from Christoph, I have been able to build 
matplotlib-1.1.0 on both Win XP-32 and 64.
I have noticed though, that quite a few warnings are produced when the 
source is compiled. Is this something that the core developers would 
like to fix, or is it a 'don't care' thing? If the info is useful, I'd 
be happy to post it somewhere.
Best regards,
Mads
-- 
+-----------------------------------------------------+
| Mads Ipsen |
+----------------------+------------------------------+
| Gåsebæksvej 7, 4. tv | |
| DK-2500 Valby | phone: +45-29716388 |
| Denmark | email: mad...@gm... |
+----------------------+------------------------------+
From: Yoshi R. <yo...@ro...> - 2011年11月08日 09:37:25
+-------------------------- Benjamin Root -----------+
> Why not something like this:
> 
> fig = plt.figure()
> grid = AxesGrid(...)
> bm = Basemap(...)
> for ax in grid :
> x, y = bm(lon, lat)
> ax.scatter(x, y, vmin=globalmin, vmax=globalmax)
> 
> I do variations of this all the time.
Thanks for the tip, this is not going to work because
Basemap() draws a map onto i want to plot, however you
pointed me in the right direction - Basemap() has an
ax=... option:
fig = plt.figure()
grid = AxesGrid(...)
for ax in grid:
 bm = Basemap(..., ax=ax)
 bm.draw...
 x, y = bm(lon, lat)
 im = ax.scatter(x, y, vmin=...)
grid.cbar_axes[0].colorbar(im)
this works in principle, but however i can't increase
the size of the grid.
even if i try something like:
fig = plt.figure(1, (15,18))
fig.subplots_adjust(left=0.01, bottom=0.01,
 right=0.99, top=0.99)
grid = AxesGrid(fig, 132,
 nrows_ncols = (2, 2),
 axes_pad = 0.1,
 cbar_location = "top",
 cbar_mode="single",
 )
i get a small grid in the center with lots of white
space around.
someone knows about that?
Best regards, yoshi
From: Anton D. <a.d...@go...> - 2011年11月07日 21:00:55
Hi,
As I remember from an earlier discussion on this, it's assumed that
> these small deviations are tolerable in the agg renderer. This makes
> the interactive backends more responsive at expenses of accuracy.
>
Do you remember the name of the thread? I would like to understand the
details on this.
I also would like to find out if i can force the renderer to do exact
drawing (at some computational cost).
I can see the same deviations using the tkagg backend with mpl 1.1.0
> but if I save as pdf using the save button I get an accurate rendering
> (see attachment).
>
I can verify this. Thanks for pointing this out.
With best regards
Anton
From: Christoph G. <cg...@uc...> - 2011年11月07日 20:49:45
On 11/6/2011 11:18 AM, kra...@gm... wrote:
> /usr/lib/pymodules/python2.7/mpl_toolkits/mplot3d/axes3d.pyc in
> set_autoscale_on(self, b)
> 252 """
> 253 Axes.set_autoscale_on(self, b)
> --> 254 self.set_autoscalez_on(self, b)
> 255
> 256 def set_autoscalez_on(self, b) :
>
> TypeError: set_autoscalez_on() takes exactly 2 arguments (3 given)
>
>
> I believe there is one self too much.
>
> Regards
> Stefan
>
Opened a pull request at 
<https://github.com/matplotlib/matplotlib/pull/567>.
Christoph
From: Benjamin R. <ben...@ou...> - 2011年11月07日 20:49:04
On Sat, Nov 5, 2011 at 3:52 PM, kra...@gm... <
kra...@gm...> wrote:
> I suppose it is possible to delete all collections one by one, but that's
> an ugly solution. And as I'm not aware of the behind the scenes work done
> by contour it's a bit dangerous.
>
> Is there a standard way to remove a contour plot?
>
> Regards
> Stefan Krastanov
>
>
This one bit me recently, too. You just have to loop through the contour
object's collections member and remove each one.
Ben Root
From: Benjamin R. <ben...@ou...> - 2011年11月07日 19:54:38
On Mon, Nov 7, 2011 at 1:40 PM, Yoshi Rokuko <yo...@ro...> wrote:
> > is there a way for using Basemap with AxisGrid?
> >
> > did someone try something like:
> >
> > grid = AxisGrid()
> > for i in range(4):
> > grid[i].scatter(with underlying Basemap)
>
> the common thing is probably something like:
>
> fig = pl.figure()
> for i in range(4):
> fig.add_subplot(2,2,i)
> bm = Basemap()
> x, y = bm(lon, lat)
> pl.scatter(x, y, ..., vmin=globalmin, vmax=globalmax)
>
> that works nice, but how do i plot a global colorbar then?
>
>
Why not something like this:
fig = plt.figure()
grid = AxesGrid(...)
bm = Basemap(...)
for ax in grid :
 x, y = bm(lon, lat)
 ax.scatter(x, y, vmin=globalmin, vmax=globalmax)
I do variations of this all the time.
Ben Root
From: Yoshi R. <yo...@ro...> - 2011年11月07日 19:41:23
> is there a way for using Basemap with AxisGrid?
> 
> did someone try something like:
> 
> grid = AxisGrid()
> for i in range(4):
> grid[i].scatter(with underlying Basemap)
the common thing is probably something like:
fig = pl.figure()
for i in range(4):
 fig.add_subplot(2,2,i)
 bm = Basemap()
 x, y = bm(lon, lat)
 pl.scatter(x, y, ..., vmin=globalmin, vmax=globalmax)
that works nice, but how do i plot a global colorbar then?
i think this is a common thing, i want to compare one
map with different scatter plots on it ...
someone did something like that before?
thank you and best regards, yoshi
From: Joel V. <jv...@st...> - 2011年11月07日 17:10:20
I also updated my macports last week and now also have a similar error:
/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/matplotlib/backends/backend_gtk.py:552: 
GtkWarning: gtk_widget_unrealize: assertion `GTK_IS_WIDGET (widget)' failed
 self.toolbar.destroy()
Just wondering if anyone has had any luck identifying how to fix it so 
python doesn't crash on exiting every time? 
Joel
From: Paul H. <pmh...@gm...> - 2011年11月07日 16:55:40
Gökhan,
This a great trick! Much simpler than digging around with line
segments and such. My old solution to this problem was so clunky and
slow I'm embarrassed to post it. Thanks so much for sharing this.
-paul
On Sat, Nov 5, 2011 at 9:39 PM, Gökhan Sever <gok...@gm...> wrote:
> Hi,
> I was wondering this about 2 years ago
> [http://old.nabble.com/Gradient-color-on-a-line-object-td25630375.html]
> Just today, I have found a very simple way to do this in mpl.
> x = np.linspace(0, 2*np.pi, 3600)
> y = np.sin(x)
> plt.scatter(x,y,c=range(len(x)), marker='_', s=1)
> Setting the marker to underscore character and choosing a relatively low
> size value makes the line appear just like I wanted. (Provided, using
> lengthy data points)
> Is this a very known trick? If not so, what is your favorite color gradient
> approach for a simple plot?
> Cheers,
> --
> Gökhan
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save 700ドル by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Zultek <zu...@li...> - 2011年11月07日 14:14:18
Hello All,
I have an issue with the pick event where when the zoom tool is used and
then the pick event is fired, the event.ind returns the number of indexes
which are visible between the zoomed xlim min and max, however the
line.get_xdata() returns all of the xdata values.
The issue is that the index of the xdata and the returned index do not match
here is an example of the output
xbound (0.4049505073424931, 0.66117278529306056) #the xbound values as seen
on the screen
index [33] #the picked index
xdata [ 0.00416667 0.0083 0.0125 0.01673333 0.02093333 
0.02516667
 0.02936667 0.0336 0.0378 0.04203333 0.04623333 0.05043333
 0.05466667 0.05886667 0.06306667 0.0673 0.0715 0.0757
 0.07993333 0.08416667 0.08836667 0.0926 0.09683333 0.10103333
 0.10523333 0.10946667 0.1137 0.11793333 0.12216667 0.12636667
 0.1306 0.13483333 0.13903333 0.14323333 0.14746667 0.15166667
 0.1559 0.1601 0.16433333 0.16853333 0.17276667 0.17696667
 0.1812 0.1854 0.1896 0.19383333 0.19806667 0.2023
 0.2065 0.21073333 0.21493333 0.21913333 0.22336667 0.22756667
 0.2318 0.23603333 0.24023333 0.24446667 0.2488 0.25303333
 0.25726667 0.26146667 0.2657 0.26993333 0.2742 0.27843333
 0.28263333 0.28686667 0.29106667 0.2953 0.2995 0.3037
 0.30793333 0.31216667 0.31636667 0.3206 0.3248 0.329
 0.33323333 0.33743333 0.34166667 0.3459 0.3501 0.35433333
 0.35853333 0.36273333 0.36696667 0.3712 0.37543333 0.37963333
 0.38383333 0.38806667 0.39226667 0.39646667 0.4007 0.40493333
 0.40916667 0.4134 0.41766667 0.42186667 0.4261 0.43033333
 0.43456667 0.43876667 0.44296667 0.4472 0.4514 0.45563333
 0.45986667 0.4641 0.46833333 0.47256667 0.47676667 0.481
 0.48523333 0.48946667 0.4937 0.49793333 0.50213333 0.50636667
 0.5106 0.5148 0.51903333 0.52326667 0.52746667 0.5317
 0.53593333 0.54016667 0.5444 0.54863333 0.55283333 0.55706667
 0.5613 0.5655 0.56973333 0.574 0.57823333 0.58246667
 0.58666667 0.5909 0.59513333 0.59933333 0.60353333 0.60776667
 0.61196667 0.6162 0.6204 0.62463333 0.62886667 0.6331
 0.6373 0.6415 0.64573333 0.64993333 0.65416667 0.6584
 0.6639 0.66846667 0.67316667 0.67816667 0.6824 0.68663333
 0.69083333 0.69623333 0.70046667 0.70466667 0.70886667 0.71426667
 0.71846667 0.7236 0.72783333 0.7322 0.7367 0.7412
 0.74543333 0.74963333 0.75386667 0.7581 0.76233333 0.76653333
 0.77076667 0.77496667 0.7792 0.78343333 0.78766667 0.7919
 0.7961 0.80033333 0.80456667 0.8088 0.813 0.81723333
 0.82146667 0.82566667 0.8299 0.8341 0.83833333 0.84256667
 0.84676667 0.85096667 0.8552 0.85943333 0.86363333 0.86786667
 0.8721 ] #the data in my x axis
xdata[index] [ 0.14323333] ydata[index] [ 0.04673034] #the data returned
from the pick event 
as can be seen the data on the screen is limited to the xbound, and the
picked data is index 33 of the entire xdata (and ydata)
is there a simple command that only picks the data from the xbound values
and not the entire xdata?
pls healp
-- 
View this message in context: http://old.nabble.com/how-do-you-pick-the-data-values-from-a-line-that-has-been-zoomed-in-tp32788725p32788725.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Yoshi R. <yo...@ro...> - 2011年11月07日 10:53:25
is there a way for using Basemap with AxisGrid?
did someone try something like:
grid = AxisGrid()
for i in range(4):
 grid[i].scatter(with underlying Basemap)
?
thank you and best regards, yoshi
From: questions a. <que...@gm...> - 2011年11月06日 21:30:27
no that didn't work and I am back to thinking it is not the dates fault,
this is because if I only choose a section of my array that I know doesn't
have any NANs it works fine. Is there a way to tell is to skip/ignore these?
On Sat, Nov 5, 2011 at 8:50 AM, Stan West <sta...@nr...> wrote:
> **
>
> *From:* questions anon [mailto:que...@gm...]
> *Sent:* Wednesday, November 02, 2011 17:17
>
> Thanks, I think you are right about the datetimes for the x axis causing
> the problem.
> Does anyone have any ideas how to resolve this?
>
> Does it help to call ax.xaxis_date() before your calls to plt.plot()?
>
From: klo uo <kl...@gm...> - 2011年11月06日 20:58:31
Like in Basemap examples:
http://matplotlib.github.com/basemap/users/examples.html (topographic
image in the middle of page) ground 0 has some yellow/orange color
making seas and oceans coasts in that same, color instead light blue
(as we'd all expect I guess)
So how to shift this particular colormap (cm.GMT_haxby) up a bit, so
that I get expected colors?
From: <kra...@gm...> - 2011年11月06日 19:18:32
/usr/lib/pymodules/python2.7/mpl_toolkits/mplot3d/axes3d.pyc in
set_autoscale_on(self, b)
 252 """
 253 Axes.set_autoscale_on(self, b)
--> 254 self.set_autoscalez_on(self, b)
 255
 256 def set_autoscalez_on(self, b) :
TypeError: set_autoscalez_on() takes exactly 2 arguments (3 given)
I believe there is one self too much.
Regards
Stefan
Thanks!
Now,it's better it gives me my 10 points but it supposed to give me the 
2 axes with values from 0-1000,but they are not.
data=[]
for i in range(0,1000,100):
 mydata=(sc.array([i,rw1.MeanSquareDistance1d(i,np)])).tolist()
 data.append(mydata)
print(data)
fig3=plt.figure()
x,y=sc.transpose(data)
plt.plot(x,y,'bo')
plt.show()
(It isn't affected if i do plt.axis([0, 1000, 0, 1000])
You can also do
x,y = zip(*pts)
If you don't feel like importing numpy.
Ben
On Sun, Nov 6, 2011 at 12:49 PM, Tony Yu <ts...@gm...> wrote:
>
>
> On Sun, Nov 6, 2011 at 8:20 AM, Gousios George <gg...@wi...>wrote:
>
>> Hello,
>> Is there a way?Like the title says?
>> I have a 2d list :
>> > [[ 0 1]
>> > [ 1 1]
>> > [ 1 0]
>> > [ 2 0]
>> > [ 1 0]
>> > [ 2 0]
>> > [ 1 0]
>> > [ 0 0]
>> > [ 1 0]
>> > [ 1 -1]]
>>
>> and i want to do the "listplot' from mathematica.
>>
>
> I don't know of a plot function to do this, but one extra line of code
> should suffice:
>
> pts = [[0, 1],
> [1, 1],
> [1, 0],
> [2, 0],
> [1, 0],
> [2, 0],
> [1, 0],
> [0, 0],
> [1, 0],
> [1,-1]]
> x, y = np.transpose(pts)
> plt.plot(x, y)
>
>
> Best,
> -Tony
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save 700ドル by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
On Sun, Nov 6, 2011 at 8:20 AM, Gousios George <gg...@wi...>wrote:
> Hello,
> Is there a way?Like the title says?
> I have a 2d list :
> > [[ 0 1]
> > [ 1 1]
> > [ 1 0]
> > [ 2 0]
> > [ 1 0]
> > [ 2 0]
> > [ 1 0]
> > [ 0 0]
> > [ 1 0]
> > [ 1 -1]]
>
> and i want to do the "listplot' from mathematica.
>
I don't know of a plot function to do this, but one extra line of code
should suffice:
pts = [[0, 1],
 [1, 1],
 [1, 0],
 [2, 0],
 [1, 0],
 [2, 0],
 [1, 0],
 [0, 0],
 [1, 0],
 [1,-1]]
x, y = np.transpose(pts)
plt.plot(x, y)
Best,
-Tony
Hello,
Is there a way?Like the title says?
I have a 2d list :
> [[ 0 1]
> [ 1 1]
> [ 1 0]
> [ 2 0]
> [ 1 0]
> [ 2 0]
> [ 1 0]
> [ 0 0]
> [ 1 0]
> [ 1 -1]]
and i want to do the "listplot' from mathematica.
Thanks!
From: Gökhan S. <gok...@gm...> - 2011年11月06日 04:39:10
Hi,
I was wondering this about 2 years ago [
http://old.nabble.com/Gradient-color-on-a-line-object-td25630375.html]
Just today, I have found a very simple way to do this in mpl.
x = np.linspace(0, 2*np.pi, 3600)
y = np.sin(x)
plt.scatter(x,y,c=range(len(x)), marker='_', s=1)
Setting the marker to underscore character and choosing a relatively low
size value makes the line appear just like I wanted. (Provided, using
lengthy data points)
Is this a very known trick? If not so, what is your favorite color gradient
approach for a simple plot?
Cheers,
-- 
Gökhan
From: Gökhan S. <gok...@gm...> - 2011年11月06日 04:33:36
8 messages has been excluded from this view by a project administrator.

Showing results of 339

<< < 1 .. 9 10 11 12 13 14 > >> (Page 11 of 14)
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 によって変換されたページ (->オリジナル) /