width

matplotlib border width

[亡魂溺海] 提交于 2021-01-16 06:13:18
问题 I use matplotlib 0.99. I am not able to change width of border of subplot , how can I do it? Code is as follows: fig = plt.figure(figsize = (4.1, 2.2)) ax = fig.add_subplot(111) ax.patch.set_ linewidth(0.1) ax.get_frame().set_linewidth(0.1) The last two lines do not work, but the following works fine: legend.get_frame().set_ linewidth(0.1) 回答1: You want to adjust the border line size? You need to use ax.spines[side].set_linewidth(size). So something like: [i.set_linewidth(0.1) for i in ax

matplotlib border width

喜你入骨 提交于 2021-01-16 06:13:08
问题 I use matplotlib 0.99. I am not able to change width of border of subplot , how can I do it? Code is as follows: fig = plt.figure(figsize = (4.1, 2.2)) ax = fig.add_subplot(111) ax.patch.set_ linewidth(0.1) ax.get_frame().set_linewidth(0.1) The last two lines do not work, but the following works fine: legend.get_frame().set_ linewidth(0.1) 回答1: You want to adjust the border line size? You need to use ax.spines[side].set_linewidth(size). So something like: [i.set_linewidth(0.1) for i in ax

matplotlib border width

可紊 提交于 2021-01-16 06:11:44
问题 I use matplotlib 0.99. I am not able to change width of border of subplot , how can I do it? Code is as follows: fig = plt.figure(figsize = (4.1, 2.2)) ax = fig.add_subplot(111) ax.patch.set_ linewidth(0.1) ax.get_frame().set_linewidth(0.1) The last two lines do not work, but the following works fine: legend.get_frame().set_ linewidth(0.1) 回答1: You want to adjust the border line size? You need to use ax.spines[side].set_linewidth(size). So something like: [i.set_linewidth(0.1) for i in ax

matplotlib border width

白昼怎懂夜的黑 提交于 2021-01-16 06:09:00
问题 I use matplotlib 0.99. I am not able to change width of border of subplot , how can I do it? Code is as follows: fig = plt.figure(figsize = (4.1, 2.2)) ax = fig.add_subplot(111) ax.patch.set_ linewidth(0.1) ax.get_frame().set_linewidth(0.1) The last two lines do not work, but the following works fine: legend.get_frame().set_ linewidth(0.1) 回答1: You want to adjust the border line size? You need to use ax.spines[side].set_linewidth(size). So something like: [i.set_linewidth(0.1) for i in ax

matplotlib border width

倖福魔咒の 提交于 2021-01-16 06:07:56
问题 I use matplotlib 0.99. I am not able to change width of border of subplot , how can I do it? Code is as follows: fig = plt.figure(figsize = (4.1, 2.2)) ax = fig.add_subplot(111) ax.patch.set_ linewidth(0.1) ax.get_frame().set_linewidth(0.1) The last two lines do not work, but the following works fine: legend.get_frame().set_ linewidth(0.1) 回答1: You want to adjust the border line size? You need to use ax.spines[side].set_linewidth(size). So something like: [i.set_linewidth(0.1) for i in ax

What is the difference between CSS fit-content and max-content?

♀尐吖头ヾ 提交于 2020-07-31 06:39:06
问题 I'm following this article https://css-tricks.com/almanac/properties/w/width/ to try to understand how this rules work. I have this example: *{margin:0; padding:0} .box{ background: lightgreen; margin: 0 auto; width: -webkit-fit-content; width: -moz-fit-content; width: fit-content; } <div class="box"> <img src="https://tyrannyoftradition.files.wordpress.com/2012/05/cutest-kitten-hat-ever-13727-1238540322-17.jpg" alt="" /> <figure>Yes, put some text here that is wider than the image above to

When android calculate width and height of views

不想你离开。 提交于 2020-07-09 07:00:12
问题 I create my hierarchy of views by code, and then I do setContentView() in the Activity with my root view like argument. I need know width and height of one view in runtime but if i do getWidth() or getHeight() , i get 0. If i wait a few seconds i get the correct width or height. I only want to know in what moment android calculate width / height of views. My code isn't outstanding Thanks! 回答1: This is because in onCreate() the layouts haven't been calculated yet. So you need to add a

reduce width of bars in multiple barplot R

社会主义新天地 提交于 2020-07-03 06:52:20
问题 I need to reduce the width of the bars in the below multiple barplot: I tried to use the space option as per here Change width of bars in barchart (R) but it seems that with multiple barplot (i.e. in my case 4 bars per each variable) the function space does not work. Here's some fake data that reproduce the plot: mat_example = matrix(rnorm(40), 4, 10) barplot(mat_example[,c(1:10)], beside = TRUE) Thank you for any suggestions. 回答1: In help(barplot) there is this paragraph: space: the amount