存款惊人_如何使您的图快速美丽惊人

存款惊人

So, you just finished retrieving, processing, and analyzing your data. You grab your data and you decide to graph it so you can show others your findings. You click ‘graph’ and……

因此,您刚刚完成了数据的检索,处理和分析。 您获取数据并决定对其进行图形绘制,以便向他人展示您的发现。 您单击“图形”,然后……

Ya looks kinda boring. What we want is something a little more fun and dynamic. Something like… this:

雅看起来有点无聊 。 我们想要的是更多有趣和动态的东西。 像这样的东西:

Data, Data Visualization, Animate, Animation, After Effects, Illustrator, Adobe
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

Yes! Now that looks awesome! So let’s see how we can do quickly get this animation going.

是! 现在看起来棒极了! 因此,让我们看看如何快速制作动画。

先决条件 (Prerequisites)

Okay here’s what you’ll need to get started:

好的,这是您开始需要的:

  • Data for a bar graph (duh!)

    条形图的数据(du!)
  • Adobe Illustrator (Don’t worry we don’t need it for anything complicated)

    Adobe Illustrator (不用担心,我们不需要它来处理任何复杂的事情)

  • Adobe After Effects

    Adobe After Effects

步骤1:使您的Excel图看起来更好 (Step 1: Make Your Excel Graph Look Better)

So, let’s just do a few things to make our graph look better. We can start by making the text a bit larger and let’s change the graph style while we’re at it.

因此,让我们做一些事情来使我们的图形看起来更好。 我们可以先使文本稍大一些,然后在使用时更改图形样式。

Now for the style, I don’t want the y-axis and instead, I just want the total numeric value at the top of each bar in our graph. We can do it in excel pretty easily,

现在,对于样式,我不需要y轴,而只希望图形中每个条形顶部的总数值。 我们可以很容易地在excel中做到这一点,

  1. Select the graph

    选择图
  2. Click on the ‘brush icon’

    点击“ 画笔图标”

  3. Under ‘Style’ we can find the graph style we’re looking for. For me, it was the second one but it may be different for you.

    在“ 样式 ”下,我们可以找到所需的图形样式。 对我来说,这是第二个,但对您来说可能有所不同。

Data, Data Visualization, Animate, Animation, After Effects, Illustrator, Adobe
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

Next just make the font size larger and change the font to whatever tickles your fancy. Remove any background lines (you can just select and delete them). And maybe make the bar wider. After I was done editing my graph looked like this.

接下来,只需增大字体大小,然后将字体更改为您喜欢的字体即可。 删除所有背景线(您可以选择并删除它们)。 也许将标准扩大。 完成编辑后,我的图形如下所示。

Data, Data Visualization, Animate, Animation, After Effects, Illustrator, Adobe
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

Don’t worry about the text being too light right now, later on, I’ll be adding a darker background color to make things pop more.

不必担心文本现在太浅,以后,我将添加较深的背景颜色以使内容流行更多。

Experiment, and play with the kind of design you want to have, feel free to be as creative as you want.

尝试并尝试您想要的设计,随意发挥自己想要的创意。

步骤2:将Excel图表分解为Adobe Illustrator中的组件 (Step 2: Break the Excel Chart Into Components in Adobe Illustrator)

Create a new project in Adobe Illustrator and set the size to 1920 by 1080. Then simply copy-paste the graph you just made from Excel into Illustrator.

在Adobe Illustrator中创建一个新项目,并将大小设置为1920 x1080。然后将您刚刚从Excel制作的图形复制粘贴到Illustrator中。

The image will copy in as a vector image meaning you can resize it without having to worry about quality loss. Resize your image until it fits the way you want it to on your canvas. See below for reference on how it’s been sized.

该图像将作为矢量图像复制,这意味着您可以调整其大小而不必担心质量损失。 调整图像大小,直至适合您在画布上的显示方式。 有关如何调整尺寸的信息,请参见下文。

Data, Data Visualization, Animate, Animation, After Effects, Illustrator, Adobe
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

将每个条分成自己的层 (Split Each Bar Into Their Own Layer)

If you open the ‘Layers’ panel (you can click f7 or Window -> Layers to open it up) you should see ‘Layer 1’. If we open it up, we should see a Layer called ‘<Clip Group>’ with all the bars that we need.

如果打开“ 图层 ”面板(可以单击f7或“窗口”->“图层”将其打开),则应该看到“ 图层1 ”。 如果打开它,我们应该看到一个名为' <Clip Group> '的图层,其中包含我们需要的所有条形图。

Image for post
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

Right now they’re all stuck together.

现在他们都粘在一起了。

1. Select that ‘<Clip group>’ -> Right-click on the bar -> Select ‘Release Clipping Mask’. That will create a ‘Compound Path’ Layer.

1.选择“ <Clip group> ”->右键单击栏->选择“ Release Clipping Mask ”。 这将创建一个“ 复合路径 ”层。

2. Select this layer and again right-click on the bar and select ‘Release Compound Path’. Now we have all the bars separated.

2.选择该层,然后再次右键单击该栏,然后选择“ Release Compound Path ”。 现在,我们将所有条形分开。

Data, Data Visualization, Animate, Animation, After Effects, Illustrator, Adobe
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

Create five new layers (one for each bar) and drag each bar layer into the new layer. Rename the new bar layers to make it easier to use in After Effects later.

创建五个新层(每个条形一个),并将每个条形层拖动到新层中。 重命名新的条形图层,以便以后在After Effects中更容易使用。

Data, Data Visualization, Animate, Animation, After Effects, Illustrator, Adobe
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

将条形值拆分为新层 (Split the Bar Values Into a New Layer)

Create one more layer called ‘Values’ and just move all the numeric bar values into that layer. Make sure not to move any of the Year values, we just want the bar values there.

再创建一个称为“值”的层,然后将所有数字条值移动到该层中。 确保不要移动任何Year值,我们只想在其中输入柱形值。

删除不必要的层 (Remove Unnecessary Layers)

Now we’re basically done. The last thing we’ll need to do is remove any sub-layers in Layer 1 that we don’t need.

现在我们基本上完成了。 我们需要做的最后一件事是删除不需要的第1层中的所有子层。

An easy way to do this is to click on the little ‘eye’ icon next to the layer. If something disappears from Illustrator then we want to keep that. If it looks like nothing disappeared then we can remove it. The point of this is to delete the white background so we can add on our own later in After Effects. If you want to keep the white background feel free to move on to the next step.

一种简单的方法是单击图层旁边的小“ 眼睛 ”图标。 如果Illustrator中消失了,那么我们要保留该内容如果看起来什么都没有消失,那么我们可以将其删除 。 这样做的目的是删除白色背景,以便稍后在After Effects中添加自己的背景。 如果要保留白色背景,请继续进行下一步。

Once that’s done rename ‘Layer 1’ to ‘Axis’ so it’s easier to identify in After Effects.

完成后,将“ Layer 1 ”重命名为“ Axis ”,以便在After Effects中更容易识别。

步骤3:在After Effects中制作动画 (Step 3: Animating In After Effects)

Create a new After Effects project and set the size to 1920 by 1080. My duration was set to 5 seconds but you can set it 3 seconds if you want to. Next, we need to import the Illustrator file that we just created. We can do this by double-clicking the Project Panel and selecting our AI file.

创建一个新的After Effects项目,并将大小设置为1920 x1080。我的持续时间设置为5秒,但您可以将其设置为3秒。 接下来,我们需要导入刚刚创建的Illustrator文件。 我们可以通过双击“项目面板”并选择我们的AI文件来实现。

Make sure that Import Kind is set to Composition and Footage Dimension is set to Layer Size. We can then just click on the new composition that after-effects automatically created for us and start working on it. You should also see all our layers in the Composition Panel.

确保将“ 导入种类”设置为“ 合成”,并将“ 影片尺寸”设置为“ 图层大小” 。 然后,我们只需单击后效果自动为我们创建的新构图,然后开始进行处理。 您还应该在“合成面板”中看到我们所有的图层。

Data, Data Visualization, Animate, Animation, After Effects, Illustrator, Adobe
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

Each layer has an anchor point. These anchor points are the points at which the effects we apply take place. We’ll need to move these anchor points to the bottom of each bar so that the animation starts from that point.

每层都有一个锚点。 这些锚点是我们应用效果发生的点。 我们需要将这些锚点移动到每个栏的底部,以便动画从该点开始。

To do this

去做这个

  1. Select a specific bar object (example: bar 1)

    选择特定的条对象(例如:条1)
  2. In the toolbar select the anchor tool.

    在工具栏中,选择锚点工具。
  3. Then just move the anchor to the center bottom of the bar. Repeat this for each bar. You can see an example below for how I did it.

    然后只需将锚点移动到钢筋的中央底部即可。 对每个栏重复此操作。 您可以在下面查看我的操作示例。
Data, Data Visualization, Animate, Animation, After Effects, Illustrator, Adobe
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

将范围从0%扩展到100% (Scaling the Bar From 0% to 100%)

Once we have our anchors set at the correct position we can start animating. This part is really simple.

一旦将锚点设置在正确的位置,就可以开始制作动画了。 这部分非常简单。

In the Composition Panel: Bar Layer (ex: Bar 1) > Transform > Scale.

在“合成”面板中:条形图层(例如:条形1)>变换>缩放。

  1. Unlink the scale by clicking the chain icon on the scale option. This unlinks the width from the height.

    通过单击比例选项上的链图标取消比例的链接。 这将宽度与高度断开。

  2. Click on the stopwatch icon next to the Scale option. This creates a keyframe for our animations.

    单击“缩放”选项旁边的秒表图标。 这将为我们的动画创建关键帧。

  3. Set the height to 0%. On the Scale options, the height is the second value.

    将高度设置为0%。 在“比例”选项上,高度是第二个值。
  4. Move the scrubber on the timeline to 7 Frames (or however long you want the animation to last) and adjust the height back to 100%. This will automatically create a new keyframe for us and animate our growing bar from 0% to 100% of its original height, over 7 frames.

    将时间轴上的洗涤器移动到7帧(或希望动画持续多长时间),然后将高度调整回100%。 这将自动为我们创建一个新的关键帧,并在7帧的范围内,将不断增长的条形从其原始高度的0%设置为100%进行动画处理。
Data, Data Visualization, Animate, Animation, After Effects, Illustrator, Adobe
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

添加弹跳动画 (Add The Bounce Animation)

The bounce animation makes it so that when our bar reaches the top it will overshoot and then go back down. This makes the animation look a lot smoother and more lively.

跳动动画使之变得如此,以便当我们的酒吧到达顶部时,它会过冲,然后回落。 这使动画看起来更加流畅和生动。

To do this click on the stopwatch icon next to Scale while holding down the ALT key. A text area will open on the timeline. Copy-paste the following there.

为此,请在按住ALT键的同时单击“缩放”旁边的秒表图标 时间线上将打开一个文本区域。 复制以下内容。

// Inertial Bounce - Created by Animoplex: www.animoplex.com
// Original Version: http://www.graymachine.com/top-5-effects-expressions/
// Modified expression for a smoother bounce effect and easier editing. Use this on any property with two keyframes to get a nice bounce effect that is based on velocity of the value change. Perfect for a scale from 0 to 100 or a speedy rotation that needs some extra life. Adjust amp, freq and decay values to tweak the effect. Amp is intensity, freq is bounces per second, and decay is the speed of decay, slow to fast.// Variation Aamp = 5.0; freq = 2.0; decay = 4.0;n = 0;
if (numKeys > 0) {
n = nearestKey(time).index;
if (key(n).time > time) { n--; }
}
if (n == 0) { t = 0; }
else { t = time - key(n).time; }
if (n > 0 && t < 1) {
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
value + v*(amp/100)*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}
else { value; }
Data, Data Visualization, Animate, Animation, After Effects, Illustrator, Adobe
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

Congratulations! The hard part is over, now we just need to do some copy-pasting and fix up a few things. You should now have something that looks like this:

恭喜你! 困难的部分已经过去,现在我们只需要进行一些复制粘贴并修复一些问题即可。 您现在应该具有如下所示的内容:

Data, Data Visualization, Animate, Animation, After Effects, Illustrator, Adobe
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

将粘贴动作效果复制到其他栏 (Copy Paste Motion Effect to Other Bars)

If you close the dropdown menu for the component we were just working on and select it again you can type the letter ‘U’ on your keyboard to just view properties you’ve changed.

如果关闭我们正在处理的组件的下拉菜单,然后再次选择它,则可以在键盘上键入字母“ U”以仅查看已更改的属性。

  1. Do that and select the two keyframes we just made.

    这样做,然后选择我们刚刚制作的两个关键帧。
  2. Ctrl+C or Cmd+C to copy them.

    Ctrl + C或Cmd + C复制它们。
  3. Select each of the other bar components and paste them to each one.

    选择其他每个条形组件并将它们粘贴到每个。
Data, Data Visualization, Animate, Animation, After Effects, Illustrator, Adobe
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

排档时间 (Shift Timing of Bars)

Having all the properties open for all the bars we just animated. We see that the animation for each bar takes place at the same time. To fix this we just need to shift the keyframe animation for each bar to start when the last one animation ended.

为所有我们刚刚设置动画的条打开所有属性。 我们看到每个条的动画是同时发生的。 为了解决这个问题,我们只需要移动每个小节的关键帧动画就可以在最后一个动画结束时开始。

Bar 5’ for me was my first bar on the graph and ‘Bar 1’ was my last. So for me, I just need to shift them like shown below but you may need to shift them differently.

对我来说,“ Bar 5 ”是我在图表上的第一个酒吧,“ Bar 1 ”是我的最后一个。 因此,对我来说,我只需要像下面显示的那样移动它们,但是您可能需要以不同的方式移动它们。

Image for post
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

动画酒吧价值观 (Animate The Bar Values)

The values being there at the beginning of the animation is pretty weird. Instead, a better look would be for them to appear near the end of the animation.

动画开始处的值很奇怪。 取而代之的是,更好的外观是使它们出现在动画的结尾附近。

  1. Click on the ‘Values’ component > Transform > Opacity

    单击“值”组件>“变换”>“不透明度”
  2. Click the stopwatch and set the keyframe to 0%

    单击秒表并将关键帧设置为0%
  3. We want to not start animating until near the end of the animation so position your time scrubber halfway between the start and end of the last bar animation. You can manually create a keyframe by selecting the diamond icon on the far right of the Opacity property.

    我们希望启动动画,直到接近动画所以一开始和最后一棒动画结束之间的中间位置的时间进度条的末端。 您可以通过选择“不透明度”属性最右边的菱形图标来手动创建关键帧。

  4. Move the scrubber to the end of the last bar animation and set the opacity to back to 100%. Now the values will appear near the end of the animation.

    将洗涤器移动到最后一个小节动画的末尾,并将不透明度设置回100%。 现在,这些值将出现在动画的结尾附近。
Image for post
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

添加背景色 (Add Background Color)

  1. Layer > New > Solid…

    图层>新建>实体…
  2. Pick your favorite color.

    选择您喜欢的颜色。
  3. In the Composition Panel drag your background to the bottom to see your graph again.

    在“合成面板”中,将背景拖到底部以再次查看图形。
Image for post
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

你完成了! (You’re Done!)

Marvel at your beautiful creation.

惊叹于您的美丽创作。

Data, Data Visualization, Animate, Animation, After Effects, Illustrator, Adobe
Photo Taken by Bruce Ironhardt
布鲁斯·铁哈特(Bruce Ironhardt)摄

If you liked this consider reading some more cool stuff like How to Handle Missing Data in Python

如果您喜欢此方法,请考虑阅读一些更酷的内容,例如如何处理Python中的缺失数据。

Or How salmon can use a magical force to return home!

或鲑鱼如何利用魔法力量回家

翻译自: https://towardsdatascience.com/data-visualization-animate-bar-graphs-df9ca03a09f2

存款惊人

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/388066.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

pytest自动化6:pytest.mark.parametrize装饰器--测试用例参数化

前言&#xff1a;pytest.mark.parametrize装饰器可以实现测试用例参数化。 parametrizing 1. 下面是一个简单是实例&#xff0c;检查一定的输入和期望输出测试功能的典型例子 2. 标记单个测试实例为失败&#xff0c;例如使用内置的mark.xfail&#xff0c;则跳过该用例不执行直…

基于easyui开发Web版Activiti流程定制器详解(六)——Draw2d详解(二)

&#xfeff;&#xfeff;上一篇我们介绍了Draw2d整体结构&#xff0c;展示了组件类关系图&#xff0c;其中比较重要的类有Node、Canvas、Command、Port、Connection等&#xff0c;这篇将进一步介绍Draw2d如何使用以及如何扩展。 进入主题&#xff1a; 详细介绍一下Draw2d中几个…

Ubuntu16.04 开启多个终端,一个终端多个小窗口

Ubuntu16.04 开启多个终端&#xff0c;一个终端多个小窗口 CtrlShift T,一个终端开启多个小终端 CtrlAlt T 开启多个终端 posted on 2019-03-15 11:26 _孤城 阅读(...) 评论(...) 编辑 收藏 转载于:https://www.cnblogs.com/liuweijie/p/10535904.html

敏捷 橄榄球运动_澳大利亚橄榄球迷的研究声称南非裁判的偏见被证明是错误的

敏捷 橄榄球运动In February 2020, an Australian rugby fan produced a study, claiming to show how South African rugby referees were exhibiting favorable bias towards South African home teams. The study did not consider how other countries’ referees treat So…

activiti 部署流程图后中文乱码

Activiti工作流引擎使用 1.简单介工作流引擎与Activiti 对于工作流引擎的解释请参考百度百科&#xff1a;工作流引擎 1.1 我与工作流引擎 在第一家公司工作的时候主要任务就是开发OA系统&#xff0c;当然基本都是有工作流的支持&#xff0c;不过当时使用的工作流引擎是公司一些…

Luogu 4755 Beautiful Pair

分治 主席树。 设$solve(l, r)$表示当前处理到$[l, r]$区间的情况&#xff0c;我们可以找到$[l, r]$中最大的一个数的位置$mid$&#xff0c;然后扫一半区间计算一下这个区间的答案。 注意&#xff0c;这时候左半边是$[l, mid]$&#xff0c;而右区间是$[mid, r]$&#xff0c;我…

网络传播动力学_通过简单的规则传播动力

网络传播动力学When a single drop of paint is dropped on a surface the amount of space that the drop will cover depends both on time and space. A short amount of time will no be enough for the drop to cover a greater area, and a small surface will bound the…

BPMN2.0-概要

BPMN2.0-概要 作者&#xff1a;AliKevin2011&#xff0c;发布于2012-6-27 一、BPMN简介 BPMN&#xff08;Business Process Model And Notation&#xff09;- 业务流程模型和符号 是有BPMI&#xff08;Business Process Management Initiative&#xff09;开发的一套变准的业务…

Activiti 简易教程

一搭建环境 1.1 JDK 6 activiti 运行在版本 6以上的 JDK上。转到 Oracle Java SE下载页面&#xff0c;点击按钮“下载 JDK”。网页中也有安装说明。要核实安装是否成功&#xff0c;在命令行上运行 java–version。将打印出安装的 JDK的版本。 1.2 Ant 1.8.1 从 Ant[http://…

koa2 中使用 svg-captcha 生成验证码

1. 安装svg-captcha $ npm install --save svg-captcha 2. 使用方法 生成有4个字符的图片和字符串const svgCaptcha require(svg-captcha)const cap svgCaptcha.create({size: 4, // 验证码长度width:160,height:60,fontSize: 50,ignoreChars: 0oO1ilI, // 验证码字符中排除 …

iris数据集 测试集_IRIS数据集的探索性数据分析

iris数据集 测试集Let’s explore one of the simplest datasets, The IRIS Dataset which basically is a data about three species of a Flower type in form of its sepal length, sepal width, petal length, and petal width. The data set consists of 50 samples from …

Oracle 12c 安装 Linuxx86_64

1)下载Oracle Database 12cRelease 1安装介质 官方的下载地址&#xff1a; 1&#xff1a;http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html 2&#xff1a;https://edelivery.oracle.com/EPD/Download/get_form?egroup_aru_number16496…

python初学者_初学者使用Python的完整介绍

python初学者A magical art of teaching a computer to perform a task is called computer programming. Programming is one of the most valuable skills to have in this competitive world of computers. We, as modern humans, are living with lots of gadgets such as …

医疗大数据处理流程_我们需要数据来大规模改善医疗流程

医疗大数据处理流程Note: the fictitious examples and diagrams are for illustrative purposes ONLY. They are mainly simplifications of real phenomena. Please consult with your physician if you have any questions.注意&#xff1a;虚拟示例和图表仅用于说明目的。 …

ASP.NET Core中使用GraphQL - 第七章 Mutation

ASP.NET Core中使用GraphQL - 目录 ASP.NET Core中使用GraphQL - 第一章 Hello WorldASP.NET Core中使用GraphQL - 第二章 中间件ASP.NET Core中使用GraphQL - 第三章 依赖注入ASP.NET Core中使用GraphQL - 第四章 GrahpiQLASP.NET Core中使用GraphQL - 第五章 字段, 参数, 变量…

POM.xml红叉解决方法

方法/步骤 1用Eclipse创建一个maven工程&#xff0c;网上有很多资料&#xff0c;这里不再啰嗦。 2右键maven工程&#xff0c;进行更新 3在弹出的对话框中勾选强制更新&#xff0c;如图所示 4稍等片刻&#xff0c;pom.xml的红叉消失了。。。

JS前台页面验证文本框非空

效果图&#xff1a; 代码&#xff1a; 源代码&#xff1a; <script type"text/javascript"> function check(){ var xm document.getElementById("xm").value; if(xm null || xm ){ alert("用户名不能为空"); return false; } return …

05精益敏捷项目管理——超越Scrum

00.我们不是不知道它会给我们带来麻烦&#xff0c;只是没想到麻烦会有这么多。——威尔.罗杰斯 01.知识点&#xff1a; a.Scrum是一个强大、特意设计的轻量级框架&#xff0c;器特性就是将软件开发中在制品的数量限制在团队层级&#xff0c;使团队有能力与业务落班一起有效地开…

带标题的图片轮询展示

为什么80%的码农都做不了架构师&#xff1f;>>> <div> <table width"671" cellpadding"0" cellspacing"0"> <tr height"5"> <td style"back…

linux java 查找进程中的线程

这里对linux下、sun(oracle) JDK的线程资源占用问题的查找步骤做一个小结&#xff1b;linux环境下&#xff0c;当发现java进程占用CPU资源很高&#xff0c;且又要想更进一步查出哪一个java线程占用了CPU资源时&#xff0c;按照以下步骤进行查找&#xff1a;(一)&#xff1a;通过…