Join Deke McClelland for an in-depth discussion in this video Importing and graphing numerical data, part of Illustrator CS6 One-on-One: Mastery.
In this movie, I'll show you how to import and graph data inside of illustrator, so that you're working from real hard numbers. I'll go ahead and switch over to my starter document, and if you're working along with me, you might want to turn off the text layer. That'll just make things less confusing. So the first thing you'd have to do is draw a boundary for your graph using one off the graph tools. And they're all located down here. Notice the column graph is visible by default. I'll go ahead and click and hold on it and release on the tear off bar. And so we have a variety of different graphs that you can choose from.
You've got a vertical bar graph, which is better known as a column graph. The horizontal bar graph is just a standard bar graph. You also have a line graph, you can create an area graph, you can create pie charts, what have you. You don't need to get too worked up about that at this point, because you can always change the type of graph. However I know I want a horizontal bar graph, so I'll go ahead and select the bar graph tool, and then I'll close the little toolbox. Now this is the trickiest moment in creating a graph, deciding how big it should be and frankly between you and me, you're not going to get it right the first time out so you mine as well just draw something that's roughly correct.
Now I know I want something along these lines but really, because this is just in my mind's eye at this point I just know I want a graph that is wider than it is tall. So I'll go ahead and drag something like this, in order to create such a graph, and then I'll release. And as soon as you do, you'll see the spreadsheet window up here on screen, I'll just go ahead and make it a little bigger, and by default, it's got the value 1 inside of it, which is why we have 1 big bar representing the number 1, and that's it. Now you can just go ahead and enter some values if you want to.
For example, I'll enter x tab, y tab, z, and then drop down to the next row, and let's do 3 tab, 5 tab 7, and how about 4 tab, 6 tab, 8, and then finally, 5 tab, 7 tab, 9. And then, to graph that data, you just go ahead and click on the check mark in the upper right corner of the spreadsheet, and you end up with this effect right there. So I'll go ahead and close the spreadsheet, just so we can see what's going on. And notice we have a legend over here outside of the boundary what I drew, that's showing me that X is black, Y is light gray, and Z is a medium gray. If you want to change the color of any one of these bar graphs, very easy to do. But you have to do it with the white arrow tool. So I'll press the A key to get the white arrow tool because notice if you twirl open the graph layer here, you've got this item called graph but you can't expand it inside the layers panel.
Instead, what you do is you click off the graph with the wide arrow tool to deselect it. And then you basically alt click or option click up the heiarchy. So, keep an eye on what's going on here. I'll alt click once on this medium gray bar, and that will select it. That would be an option click in a Mac. I'll alt or option click a second time, and that selects all of the medium gray bars, but not the legend. And then I'll Alt or Opt + Click a third time, and that selects a legend as well. And now I can switch out the color just by clicking in the first color swatch up here in the control panel, and I'll select for example, CMYK red, and that swaps out all of those bars. And that turns out to be a very flexible way to work, because you can still modify your data later on, and it will remain red.
Anyway I want totally different data. I'm going to press the V key to switch from my black (INAUDIBLE) tool and I'll go and show you this document that I have opened in excel and notice here it is a list of years by decade along with the population of the United States in millions and this is accurate data which I've saved out in advance. Now I can import this data into illustrator but there is two things I can go wrong and I want you to see both of those things just (INAUDIBLE) counter them as your working inside the program. I'll go and switch back the illustrator click somewhere in the graph of the black arrow tool to select the entire thing. And then right click anywhere in the document window and choose data and that'll bring back my spreadsheet.
Now, you want to make sure that the first cell is selected inside the spreadsheet, as it is in my case. And then click on this icon, Import Data. And I'm going to navigate to the exercise file folder and then the 39 pictograph subfolder. And I'll go ahead and select that file, which is an old file, XL format, but it's compatible with just about every program out there. And I'll click on the open button. And I'm going to see this very bewildering alert message, the final couldn't be found negative 43. And obviously, that's not the least bit helpful if it's the first time you've seen this error message. But what it's telling you is that illustrator's not capable of importing the data when it's open in Excel.
And this is frequently the case when you see a file can't be found message so just go ahead and click OK, and I'll switch back to excel and I'll go ahead and close the document. And now if I switch back to illustator and click on the import data button and then go ahead and navigate to that 39 pictogram folder select that file again and click on the open button this is a second problem you might encounter. Illustrator can't accommodate Excel documents. So even though it will show me the file, and it will allow me to select the file, it can't open the file, because it needs a tab delimited text file.
Which is not a problem, by the way, just a hiccup. Like any good spreadsheet program. Excel and every other number crunching program out there, can export a tab delimited text file. Which just means that it's a text file, with tabs between the columns of data. And I've created such a file for you in advance. So just click OK. Click on that import data button again, go ahead and locate that 39 pictograph folder, and select this document here. Total US population data.txt and click Open again, and this time we get the data.
And notice it comes in kind of strange, and that's because at some point I went ahead and clicked in a different cell, and so the data always begins at the selected cell, which is actually a good thing. It's a little bit of a pain in the neck for us, but it's a good thing in general. Because it means you can combine multiple data files inside a single graph. So, to move this into the right location, you just want to drag across it like so. And then press Ctrl + X or Cmd + X on a Mac to cut it, and then click in the upper left cell there and press Ctrl + V or Cmd + V to paste it.
And we don't want this third column of data anymore, so drag across it and press Ctrl + X or Cmd + X on a Mac, to get rid of all of it at the same time. And then go ahead and click on the check mark in order to apply that data. And what ends up happening it's hard to see from here, I'll go ahead and close the spreadsheet. But Illustrator's gotten confused, or more accurately, I haven't told it the right thing to do, because it's mapping both the years and the population numbers inside of my graph. Even so, we have a really great start. So that's how you start things off, by importing and graphing data inside of Illustrator.
In the next movie, I'll show you how to modify the data so we get the desired results
- Setting up angular construction guides
- Kerning and clipping hand-drawn type
- Creating and naming symbols
- Using symbols to simulate master pages
- Creating a gradient mesh
- Using gradients to cast shadows
- Fading artwork with a gradient opacity mask
- Warping and distorting artwork with Liquify and Envelope
- Assembling a seamless pattern brush
- Creating charts and pictographs
- Working in 3D space
Skill Level Advanced
Q: In the "Assigning colors to mesh points" lesson, I cannot pick up the color of the visible tracing/photograph layer with the Eyedropper tool. What am I missing?
A: Make sure the template file is embedded in your file, not just linked, and try to sample the color again.