axes

matplotlib 画图中图和次坐标轴

帅比萌擦擦* 提交于 2020-01-12 22:46:35
一: fig.add_axes 画图中图 fig = plt.figure() x = np.arange(1, 9, 1) y = np.linspace(1, 10, 8) left, bottom, width, height = 0.1, 0.1, 0.8, 0.8 ax1 = fig.add_axes([left, bottom, width, height]) ax1.plot(x, y, 'r') ax1.set_xlabel('x') ax1.set_ylabel('y') ax1.set_title('title') left, bottom, width, height = 0.2, 0.6, 0.25, 0.25 ax2 = fig.add_axes([left, bottom, width, height]) ax2.plot(y, x, 'b') ax2.set_xlabel('x') ax2.set_ylabel('y') ax2.set_title('title inside 1') left, bottom, width, height = 0.6, 0.2, 0.25, 0.25 ax3 = fig.add_axes([left, bottom, width, height]) ax3.plot(y, x, 'g') ax3.set_xlabel(

Caffe源码-im2col操作

心已入冬 提交于 2020-01-12 22:32:32
目录 im2col简介 im2col.cpp源码 小结 参考 @(Caffe源码-im2col操作) im2col简介 caffe的卷积操作中使用im2col来加速,im2col将卷积核中的每个点在图像上的对应点全都提取出来按行排列,得到一个矩阵,这样就将卷积操作转化为矩阵进行操作。 如上图所示的,假设输入图像的形状为 channels=1, height=width=5 ,并且 pad_w=pad_h=1, kernel_h=kernel_w=3, stride_h=stride_w=2, dilation_w=dilation_h=1 。左侧图中蓝色为padding补充的边界,值均为0,绿色为实际图像的数据。其中卷积核中 \(k_{00}\) 位置在整个卷积操作中共计算了 output_h*output_w=9 次,每次的位置在左侧图中用黑色实心圆标注出来。而im2col操作即是将卷积核上的每个点的这些对应位置上的值都提取出来,按照右侧黄色方格的形式存放起来。这样卷积操作可简单地通过将卷积核(中间的红色方格)展成一个向量,然后与右侧的黄色方格矩阵中的每一列点乘来实现。更详细的说明可查看后面列出来的参考博客。 与im2col对应的是col2im操作,即是将矩阵还原成卷积前的图像的形状,不过caffe代码中的 col2im_cpu() 函数还稍微有些改动。 im2col.cpp源码

Custom Grids and Axes in Flare

不羁的心 提交于 2020-01-11 21:33:12
As I mentioned in my last post, I have begun a project using the Flare data visualization toolkit , and I intend to document things I learn along the way. One of the first things I investigated, after familiarizing myself with the basics was how customizable the grids and axes for visualizations could be. It took me longer than I expected to figure things out, but now that I have I would say the grids and axes in Flare are highly customizable, and should be capable of accommodating just about any needs you may have. This post is mostly code and images, but in case you want to jump around here

Major and minor ticks with different style, whole page covered D3?

家住魔仙堡 提交于 2020-01-11 14:04:06
问题 I want to draw an axis with major and minor ticks that cover my whole page styled differently. I followed structure of this example, but I can't get it to work make different between major and minor ticks lines. Here is a picture represent what I'm looking for: This is my code: // Define identity (1:1) scales var x = d3.scale.identity().domain([0, 400]); var y = d3.scale.identity().domain([0, 300]); // Define container var chart = d3.select("body") .append("svg") .attr("class", "chart") .attr

How to precisely set the axis position [duplicate]

别等时光非礼了梦想. 提交于 2020-01-06 06:10:51
问题 This question already has answers here : How to remove space between axis & area-plot in ggplot2? (3 answers) Remove extra space beyond xlim and ylim (2 answers) Closed last month . I need to crop a plot so that the axes are precisely set on a known x and y line. coord_cartesian does not behave in this way (see below). So for instance, in the image below I would like the axis to sit directly on the 30 or 40 marks. Any ideas would be greatly appreciated as this is prooving a difficult thing to

questions about axes and mtext

我是研究僧i 提交于 2020-01-05 15:45:56
问题 I am swimming backwards in my R knowledge. Please help! ExampleData: Site, Aluminum_Dissolved, Federal_Guideline M1, 0.1, 0.4 M1, 0.2, 0.4 M1, 0.5, 0.4 M2, 0.6, 0.4 M2, 0.4, 0.4 M2, 0.3, 0.4 I have a simple function: boxplot(ExampleData$Aluminum_Dissolved ~ ExampleData$Site, col="purple", par (cex.axis=2, las=2), mar=c(7,4,4,2)+0.1 X and Y axis Labels: Once I increase the values on the axis so much, my xlab and ylab are obscured by axis text. I have tried using: `mpg=c(3,1,0)` and altering

questions about axes and mtext

坚强是说给别人听的谎言 提交于 2020-01-05 15:45:11
问题 I am swimming backwards in my R knowledge. Please help! ExampleData: Site, Aluminum_Dissolved, Federal_Guideline M1, 0.1, 0.4 M1, 0.2, 0.4 M1, 0.5, 0.4 M2, 0.6, 0.4 M2, 0.4, 0.4 M2, 0.3, 0.4 I have a simple function: boxplot(ExampleData$Aluminum_Dissolved ~ ExampleData$Site, col="purple", par (cex.axis=2, las=2), mar=c(7,4,4,2)+0.1 X and Y axis Labels: Once I increase the values on the axis so much, my xlab and ylab are obscured by axis text. I have tried using: `mpg=c(3,1,0)` and altering

Force x-axis labels on facet_grid ggplot: drop lables

萝らか妹 提交于 2020-01-04 08:28:04
问题 These questions follow up on the previous posts: Force X axis text on for all facets of a facet_grid plot Force x-axis labels on facet_grid ggplot: x-axis labels differ per row I'm just starting to learn gtable . I merged the code from the above two posts to get the x-axes on each panel of the facet grid. library(ggplot2) diamondSub <-subset(diamonds, (cut=="Ideal" | cut=="Premium" | cut == "Very Good") & (color=="E" | color=="I")) p <- ggplot(diamondSub, aes(x=clarity, y=price)) + geom_blank

Force x-axis labels on facet_grid ggplot: drop lables

ぃ、小莉子 提交于 2020-01-04 08:28:04
问题 These questions follow up on the previous posts: Force X axis text on for all facets of a facet_grid plot Force x-axis labels on facet_grid ggplot: x-axis labels differ per row I'm just starting to learn gtable . I merged the code from the above two posts to get the x-axes on each panel of the facet grid. library(ggplot2) diamondSub <-subset(diamonds, (cut=="Ideal" | cut=="Premium" | cut == "Very Good") & (color=="E" | color=="I")) p <- ggplot(diamondSub, aes(x=clarity, y=price)) + geom_blank

Matlab - Scale Colorbar of Image

只愿长相守 提交于 2020-01-04 04:36:07
问题 How can I scale the colorbar axis of a false color image? I read this post,and copied the code but it seems not to work correctly: MATLAB Colorbar - Same colors, scaled values Please see the two images below. In the first (without the scaling) the coloraxis goes [1 2 3 4 5 6]*10^4 In the second image, it goes [0.005 0.01 0.015 0.02 0.025] The correct scaling (with C = 100000 ) would be [0.1 0.2 0.3 0.4 0.5 0.6] Without scaling Wrong scaling I want that the coloraxis is scaled by 1/C and I can