How to make thicker stem lines in Matplolib


Yanping Island Crab

I want to make thicker stemming in python when using plt.stem.

this is my code

import matplotlib.pyplot as plt
import numpy as np

N = 20

n = np.arange(0, 2*N, 1)

x = np.exp(-n/N)*np.exp(1j * 2*np.pi/N*n)

plt.stem(n,x.real) 

plt.show()

I changed plt.stem(n,x.real,linewidth=10), but nothing changed. Is there no function to set linewidthin plt.stem?

Andras Deak

The documentation shows that the function returns all line objects created by the plot. You can use this to manually make the lines thicker after drawing:plt.stem

import matplotlib.pyplot as plt
import numpy as np

N = 20
n = np.arange(0, 2*N, 1)
x = np.exp(-n/N)*np.exp(1j * 2*np.pi/N*n)

markers,stems,base = plt.stem(n,x.real) 
for stem in stems:
    stem.set_linewidth(10)
plt.show()

result

Related


How to make thicker stem lines in Matplolib

Yanping Island Crab I want to make thicker stemming in python when using plt.stem. this is my code import matplotlib.pyplot as plt import numpy as np N = 20 n = np.arange(0, 2*N, 1) x = np.exp(-n/N)*np.exp(1j * 2*np.pi/N*n) plt.stem(n,x.real) plt.show()

How to make two lines thicker in Chart JS

Stijn Westerhof: As you can see in the fiddle , I have used Chart JS to make the chart . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line is good. I searched everywhere and tried a

How to make two lines thicker in Chart JS

Stijn Westerhof: As you can see in the fiddle , I have used Chart JS to make the chart . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line is good. I searched everywhere and tried a

How to make two lines thicker in Chart JS

Stijn Westerhof As you can see in my fiddle , I have made the chart using Chart JS . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line means it is correct. I searched everywhere and

How to make two lines thicker in Chart JS

Stijn Westerhof: As you can see in the fiddle , I have used Chart JS to make the chart . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line is good. I searched everywhere and tried a

Sublime Text: How To Make Vertical Leader Lines Thicker

Santosh Yedidi I am using sublime text. I use the following in my settings to show indented lines: "indent_guide_options": [ "draw_normal", "draw_active" ], and changed the colors with the following in the color theme file: <key>guide<

Sublime Text: How To Make Vertical Leader Lines Thicker

Santosh Yedidi I am using sublime text. I use the following in my settings to show indented lines: "indent_guide_options": [ "draw_normal", "draw_active" ], and changed the colors with the following in the color theme file: <key>guide<

How to draw thicker lines in mschart

little thunder I have a line connecting different points. I have dynamically generated the row. I want to be a line thinker. My code is as follows: //now lets plot lines between tow points. Series newLineSeries = new Series("LineSeries" + index); //--If t

How to draw thicker lines in mschart

little thunder I have a line connecting different points. I have dynamically generated the row. I want to be a line thinker. My code is as follows: //now lets plot lines between tow points. Series newLineSeries = new Series("LineSeries" + index); //--If t

How to make a plane thicker in RGL?

what for I'll try to make some nice visual illustrations for the binary classification example using the 3D printed data. Here is my 3D plot: require(rgl) #Get example data from mtcars and normalize to range 0:1 fun_norm <- function(k){(k-min(k))/(max(k)-min(k

How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to make a plane thicker in RGL?

what for I'll try to make some nice visual illustrations for the binary classification example using the 3D printed data. Here is my 3D plot: require(rgl) #Get example data from mtcars and normalize to range 0:1 fun_norm <- function(k){(k-min(k))/(max(k)-min(k

surfc: how to make contours thicker?

wet lab student I've been reading the documentation and surfcI can't find an option to make the contour thicker, as the contour is shown below the surface. Is there anyway to do this? and Can't really find any documentation on this, but playing around I found

How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to make a plane thicker in RGL?

what for I'll try to make some nice visual illustrations for the binary classification example using the 3D printed data. Here is my 3D plot: require(rgl) #Get example data from mtcars and normalize to range 0:1 fun_norm <- function(k){(k-min(k))/(max(k)-min(k

surfc: how to make contours thicker?

wet lab student I've been reading the documentation and surfcI can't find an option to make the contour thicker, as the contour is shown below the surface. Is there anyway to do this? and Can't really find any documentation on this, but playing around I found

How to make jitterplot on matplolib python

biophysics Here is my code (adapted from here ): df_1 = pd.DataFrame({'Cells' : np.arange(0,100), 'Delta_7' : np.random.rand(100,), 'Delta_10' : np.random.rand(100,), 'Delta_14' : np.random.rand(100,)}, columns = ['Cells','Delta_7', 'Delta_10', 'Delta_14'])

How to make map border thicker in Google Geomap?

Nicholas R. I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map My model is as follows Can we try to make my map look more like a mockup? My code so far is this. <!DOC

How to make map border thicker in Google Geomap?

Nicholas R. I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map My model is as follows Can we try to make my map look more like a mockup? My code so far is like this.

How to make the outline of a radio button thicker

Sanjo I'm trying to add something like https://design-system.service.gov.uk/components/radios/ for radio buttons . The problem is that, on the radio button's focus, mine looks like this: enter image description here It should look like this: enter image descri

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev

How to make map border thicker in Google Geomap?

Nicholas R. I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map My model is as follows Can we try to make my map look more like a mockup? My code so far is this. <!DOC

How to make the outline of a radio button thicker

Sanjo I'm trying to add something like https://design-system.service.gov.uk/components/radios/ for radio buttons . The problem is that, on the radio button's focus, mine looks like this: enter image description here It should look like this: enter image descri

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev

How to use css to make font thicker then 900

Gianluca I want to make the font extra bold due to the background color of my friend's image in the website header. I found it online, but unfortunately it doesn't work. Is there any other way? h1{ text-shadow: 1px 0 #888888; letter-spacing:1px; font-wei

How to make bars thicker in Kendo UI charts?

sony My graph contains calorie vs time data. Calories have a value every 15 minutes. I want to pull the bar closer. I am posting a sample of the data along with a link to jsFiddle. Also, is it possible to display the entire 24 hours on the graph and only show

How to make the outline of a radio button thicker

Sanjo I'm trying to add something like https://design-system.service.gov.uk/components/radios/ for radio buttons . The problem is that, on the radio button's focus, mine looks like this: enter image description here It should look like this: enter image descri