Showing posts with label excel. Show all posts
Showing posts with label excel. Show all posts

Aug 7, 2007

Using Excel for Complex Lace Charts

Cross posted at marniemaclean.com

This tutorial is the 4th in my set of Excel tutorials. You can see the others here:

And, if you happen to have any tutorials of your own, please let me know.

In my last tutorial, I cover creating simple lace charts in Excel. Today, we'll approach a more complex lace pattern and introduce the no stitch. The lace pattern, I'll be covering, is most of the Peri's Parasol pattern I used in Chapeau Marnier.

What is a "no stitch"

More than any other single question, I get this most of all and I think it boils down to a lot of over thinking from the knitting community. Often, people ask if it means a stitch should be slipped. A no stitch, in fact, simply means there is no stitch in that spot. Some lace and cable patterns, change stitch count from row to row. The chart can be made a little more intuitive by distributing the stitches in a logical manner and spacing them with "no stitch" blocks. Generally, when using a "no stitch," one should format it in such a way that it can easily recede from focus. I usually shade mine in gray or black.

Format your spreadsheet

I begin, as always, by adjusting my cells so that they are approximately stitch like in proportion. See the tutorial on colorwork for more information about
this step.




Select all the cells, go to the FORMAT menu and choose CELL



Set the alignment to be centered both horizontally and vertically.
This will ensure your symbols are centered. Set your font size and add borders
to all your cells.



Conditional Formatting

One of the things that can be hard about converting verbose instructions into charts, is ensuring you always have every stitch accounted for. This can be particularly tricky when there are a lot of knit stitches (which I generally work as blank boxes) and the stitch count changes from row to row. To alleviate this, I use conditional formatting to format all cells as "no stitch" cells unless I input a character. I use spaces for knit stitches. You'll see that up ahead.

To launch the conditional formatting options, with all your cells selected, go to the FORMAT menu to CONDITIONAL FORMATING..




This will bring up a dialog box. In this case, I'll say that all cells that are equal to zero [0] should be formatted in a special way. I'm also going to go ahead and indicate that all cells that are equal to a minus sign [-] are shaded blue. These will be purl stitches.

Begin by setting your Condition as follows:

Cell Value
Is Equal To
0

Now click the FORMAT button



Set the PATTERN to a light gray or whatever you want your background to be.


Go to the BORDER tab and turn off all the borders, if you like, or make them a lighter color.


For the purl stitches, set your conditional format so that all cells that are equal to a minus sign, get formatted.




Click the FORMAT button and set the background to blue. Do not change the font or border tabs, this time, just click OK.




Click OK once again to exit the Conditional Formatting window.

Start the chart

Your screen should look something like this. Note that even though you haven't typed anything in yet, all the cells are gray with no borders. This is the conditional formatting.


Add your row counts. I had to widen those columns a little to fit the text in. You'll know you need to do the same if you get pound signs instead of the numbers you expected.

I am leaving lots of space between my row count columns, because I know my stitch count will change but I'm not sure by how much.


Now begin to enter in your stitch pattern. Here is the key I'm using for this tutorial


The first couple rows are free, the next ones will cost you.

As I indicated before, knit stitches are formed with spaces, all other stitches just employ the code found in the key.


The chart grows confusing.

The first row was pretty straightforward and its subsequent follow up row, which is just worked in the established k/p pattern. But as I continue to add rows, I see that the chart symbols don't seem to align in any meaningful way. Even though every row starts at the same point on the right, they rows grow vastly out of sync by the time we get to the left.


So, here we see all the symbols that I'll be using in this particular chart.
In reality, all those blue areas should align. This is a great place for me
to start organizing the symbols. Having left myself ample room on either side,
I can start to shift the symbols around.


Move it

Select the cells you want to move around. Move your cursor until it becomes
a little hand. Now you can drag that group of cells wherever you like.


The purl areas, indicated in blue, decrease as you move up the chart. I decided that the blue areas should align to along their left edges. You can certainly choose otherwise.

In order to do this, I'm adding additional NO STITCH blocks into the middle of the chart. You can really see how this begins to build up the shape of the stitch pattern.


Finishing up

Once all my stitches are aligned, the chart really seems to make more sense. The end result will look like the scalloped edging on the hat.

This pattern can also be set up so that the left edges align and the right edges align and additional no stitches fill in the space to the blue areas. Some charts will lend them selves more logically to a certain format, than others. The nice thing about using a computer is that you can keep playing until you are happy with the results.

Aug 3, 2007

Using Excel to create simple lace charts

Cross posted at marniemaclean.com

People run pretty hot and cold, when it comes to the topic of charts. Personally, I'm a big fan of them, and when it comes to lace, I find it nearly impossible to work without a chart. If you saw my knitting notebooks, you'd see that, no matter how simple or complex, I always chart my lace patterns out. If you enjoy working from charts or if you ever need to create a chart for a pattern, you can produce good clean results with spreadsheet software like Excel. I've created several tutorials in the past, which you can access here.

This tutorial will use some of the same techniques I've covered in Using Excel to design colorwork and Using Excel to aid in writing multi-sized patterns. If you haven't seen those tutorials and you aren't comfortable using a program like Excel, I suggest you browse them to get the basic concepts of working in Excel.

The lace

I've chosen a very simple lace stitch pattern, designed by Dorothy Reade, which I'm using in Donna Druchunas' upcoming book.

key.gif

Here are the verbose instructions.

Multiple of 6+7
Foundation row: k1, *kbl, yo, ddc, yo, kbl, k1* repeat to end of row
Even numbered rows: Purl
Row 1: ssk, *yo, kbl, k, kbl, yo, ddc* to last 6 stitches, then, yo, kbl, k, kbl, yo, k2tog
Rows 3, 5, and 7: ssk, *yo, k3, yo, ddc* to last 6 stitches, then, yo, k3, yo, k2tog
Row 9 and 13: k1 *kbl, yo, ddc, yo, kbl, k1* repeat to end of row
Row 11: ssk, *yo, kbl, k, kbl, yo, ddc* to last 6 stitches, then, yo, kbl, k, kbl, yo, k2tog

These instructions could be compressed even further, as the foundation row, 9, and 13 are all identical and 1 and 11 are identical. Even so, I find it hard to use these instructions to visualize what I'm doing. I also find that it takes me longer to memorize a lace pattern if I can't see it charted out.

Set up your workspace

Select all the rows and cells in your Excel sheet and adjust the size of the cells to mimic the shape of a knit stitch. If need be, refer to the colorwork tutorial for more information on how to do this.

Based on the verbose instructions, I see that the +7 is made up of one stitch at the beginning of the row and 6 at the end and that there is a foundation row and 7 public side rows. Because I know this, I can number my rows and add grid lines.



If you can't determine this from reading the instructions,
just begin charting your lace, and go back add the row and stitch counts and your grid lines, later.

Inserting the first row of symbols

Foundation row: k1, *kbl, yo, ddc, yo, kbl, k1* repeat to end of row

There is no need to download fancy schmancy knitting fonts. You can communicate with your standard set of characters. See the key above, to see how I've translated the stitches to letters. Use characters that will make sense to you. I like a blank stitch for knit, "t" for "twist," "o" for "yo," and slashes and a carrot for the decreases. Don't like that? Do something different. I won't hate.

The first row with a modified last repeat

Row 1: ssk, *yo, kbl, k, kbl, yo, ddc* to last 6 stitches, then, yo, kbl, k, kbl, yo, k2tog

The first row in which we have a reason for those extra 6 stitches at the end. While the main pattern repeat requires a double decrease, the first and last decreases of the row will be single decreases. You will be able to see this more clearly when we get to the end.

Convert remaining rows to chart format

Complete the pattern as indicated in the verbose instructions. Whenever I can, I like to copy and paste, duplicate stitches and rows. Do whatever works best for you.

Double check your work, going stitch by stitch from text to chart.

The end results are neat and clean, but would probably cause confusion. It's not clear where the pattern repeats begins and ends.

Outline the repeat

Select the stitches that make up the repeat. In some patterns, this is very intuitive based on how the pattern is written, but some patterns are harder to distill down to a repeat, especially those where the location of the repeat shifts for one area to another. Lucky for us, this pattern is expressly written to make the repeat obvious, it's everything between the two asterisks [*]

Just select the stitches you want to outline, and choose a thick border to outline it. You can choose a custom border by going to the FORMAT menu and choosing CELL.

Shading for clarity

Finally, to make the repeat really obvious, shade everything that only gets worked once per row. This makes the repeat really clear and visually indicates the secondary elements.

I think that you'll find that many lace and knit/purl stitch patterns can be worked up this way. Have fun with it.

In the next tutorial, I'll cover doing more complex lace charts and discuss the ever-confounding "no stitch."

Jun 28, 2007

Using Excel to aid in writing multi-sized patterns

Download the spreadsheet and play along at home.


It's been a while since I've done a tutorial and seeing as I use this technique
all the time, it's about time I shared it with all of you. This also makes
me feel better about the fact that I do not have any updates on my CAL project
to post, as my deadline pieces are all keeping me
busy.



NOTE: The attached
spreadsheet
is just a sample and contains measurements
that may be useful but which may not meet the standards for some publications.
You are welcome to use what I have for your own design purposes but it'll
be you who has to ultimately support any patterns written from it, so do
your research first.



The goal


Excel can be used to help you organize and plot your final pattern. Unfortunately, it can't do all the dirty work, but you can find yourself being a bit more consistent, if you let the program do your calculating. If you plan to submit your patterns for publication, providing a spreadsheet with all your work can be of great help to the tech editor. Doing so, may make logic errors more obvious and allow for faster editing.




A rough schematic of what we are shooting for


For simplicity's sake, we're going to make a simple boat neck top that is
identical front and back, has waist shaping, set in style armsceyes and just
a little shaping at the neck. Obviously, the more parts you have and the more
they vary, the more calculations and measurements you need. Frankly, since
I am not in the apparel business and most available resources only offer a
limited number of standard measurements, there is a point, for me, when I must
make a leap of faith with some measurements. Luckily, knits offer a certain
degree of give and take and being off a stitch or two will not generally ruin
a piece. For a fairly comprehensive list of measurements and wonderful design
instruction, I highly recommend this
book
.


At this point, don't worry about whether you'll knit in the round or not.
It's not even hugely important if you'll work bottom up or top down, though
it is usually most intuitive to organize it to flow in the same order that you will knit the piece. For this tutorial, we'll be working bottom up, so all measurements will start at the hip.


Getting started


The first thing to do is create an area to set your gauge and ease. I like
to set up the gauge box to auto calculate the stitches per inch (or per centimeter,
if you prefer) out of some larger area. Generally, I do 4 inches. Tthe way
that I have it set up, I can change that if necessary.


Make a box for gauge with 3 rows and 3 columns (see below)




Create boxes for your gauge and ease as shown above


Set the number of inches measured and then a single inch below it. I have
"4" here but you could measure 6 inches or 3 inches or any other number you
like. On the row below, set the calculation to divide the previous row's stitch
column by the number of inches. It should look something like this.




Dividing 22 stitches by 4 inches gives us 5.5 stitches per inch


I prefer to do this instead of hard coding the division by 4, because there
are times I need to change gauge after I've made the spreadsheet. This makes
it far more flexible. I can change how many inches I measured and how many stitches
I get and the stitches per inch always properly calculates.


Go ahead and set up your Ease as well. I added a vertical ease option, but
I don't think this is terribly necessary. You'd want to use this if you tend
to work with a lot of negative ease, since doing so will eat up length. For
the horizontal ease, I've used a negative number just to show that it works
with both positive or negative numbers. You can adjust this at any time and
the calculations will update. For ease, I set the amount of ease in inches and then multiply it by the appropriate gauge. This can make it faster to make some calculations.


Expand on your formula


Excel is really great at quickly calculating adjoining cells based on the
source cell. It does this by maintaining a relationship between the different
variables.


You'll note in the spreadsheet, that
I set up each area so that the sizes stay in order, side by side.


If I want
to make the waist 8 inches smaller than the chest, for all
sizes, I can quickly and easily do this without having to type in a formula
for every cell.




To calculate a waist that is 8 inches smaller than the chest, your calculation should look like this


To do this, just click the first Waist cell, go to the Formula Bar (you may
have to choose to make this toolbar visible) and click "=", click the chest
measurement cell (in my case, C7) then type "-8" and press return or tab. The
picture above shows the formula as it should be for the Waist for size 34.


The waist becomes 26" based on the formula entered.


Now to expand that to all the other sizes, select the Waist cell for size
34, move your cursor to the lower right corner of that cell until a black plus
sign appears. Click and drag across all the other sizes in that row.




When your cursor becomes a little plus sign, you know you are ready to expand the formula to adjoining cells


All the sizes will automatically update.


Name that cell (Hey, this ones an important one!)


The function I just showed you will be your best friend. Once you have your
basic measurement for each size, you'll only write your formulas once, and
then expand them to the other cells in the same row. However, there are times
when you do not have a different cell value for each size. For instance, you
only have one stitch gauge. If you multiply the waist width by the stitch gauge
and do the function above, to expand it to the other sizes, Excel will look
for the next cell to the right of the gauge, to determine the gauge for that size. Excel
doesn't understand that the gauge is a set value and must be applied to all the sizes.
You can solve this problem two ways. First, you could set up a gauge box for
each size so that when you expand the formula, there is always an accurate
value, but that's not ideal. Instead, you can name the cell associated with
stitch gauge. When you name it, you are telling excel that whenever you use
that cell, it's a fixed element. Don't go changing it when I expand a calculation
across the row.


Be careful, though, if you name a cell you don't mean to name, it can throw
off your calculations later.


To name a cell, click it.


Go to your toolbars and make sure the Formula bar is visible. This is the
same one you used to to type in your calculations. To the far left of the Formula
toolbar is a box that tells you the cell's name. Normally it will be a letter
and a number, indicating the column and row location of that cell. Click your
cursor in that box and type in a name. Click enter. Your cell has been named.
I named the stitch gauge "SG" the row gauge "RG" and also named the horizontal
and vertical ease.



Now when you can type in "sg" into any formula and have it pull in this value.
While creating a formula, you can also click on the cell to have "sg" added
to the formula.


If you are trying to name a cell and it doesn't take, make sure you are pressing Return
after typing the name. Just clicking somewhere will not apply the change.


Let's start calculating


I generally organize my info in the following way, but you may find a better way that
suits you.


In the upper left, I place my slopper measurements. These are the actual body
measurement with no ease worked in. Decide how many sizes and what measurements
you need and start filling them in. It can be helpful to break up the measurements
into meaningful sections. I just used a gray bar to add a little space. You
might also want to color code length measurements and width measurements to
help you quickly find values when you are working up a formula.


To the right, I create an area to calculate the size of the garment. This
will include ease and will be used as the basis for the final pattern. Refer
to your schematic drawing and decide what measurements you need to produce
each step of the way. I find that I'm actually doing this part and the next
part, at the same time. As I'm working out the pattern, I realize I don't know
how to get my next value because I haven't provided myself the proper information.


At any time, you can add a new row, by Option (mac) or Alt (pc) clicking the
number below where you'd like to add a row.




Spiffing up your spreadsheet with color is optional, but I think it's a nice touch.


At the bottom, I have two areas for calculating. The left area is where the raw calculations occur. I am multiplying the stitch or row gauge times various measurements to get the number of stitches or rows I need to work. The raw calculation might tell me I need to cast on 65.2394 stitches. Show me how to do that and I'll buy you a cookie.


To the right, I have the rounded version of the numbers. All I do is indicate that the exact same number should appear there. How do I do that? It's easy. The formula is just an equal sign and then click on the corresponding cell in the Raw Calculations area. Then, we go back to our expanding trick and apply it all the way across the row. Once the row is filled, we can select it and drag down to rows below.


Then, I set the cell so that it shows the number with no decimal points. To do that, I type COMMAND (mac) or CONTROL (pc) + 1. This opens the Format Cell window.




I'm telling Excel to change the formatting on a single cell, but you would select all the cells in this area and make this change.


From the NUMBER tab, choose Number and set the decimal places to zero. This will round all the numbers to the closest integer.


You raw numbers are going to default to the "GENERAL" setting which is fine. That setting will just display the numbers for as long as the decimal cares to go or can fit in the spot. You might opt to change this for your own preference.



WARNING:


Just because something is set to round, doesn't mean the numbers will be right. Take a look at the "Actual Pattern" calculations for the size 34. If you pull a calculator out, you'll see the number I have highlighted is actually wrong. The number would rightfully be the















Stitches after the underarm BO 83
Minus double the decreases 8
Total 75

Yet we get 76 in the spreadsheet . How come?


The answer is rounding errors. All those decimal places gained us a stitch somewhere. When it comes time to finalize your document, you'll want to overwrite the rounded numbers with the actual numbers. I leave this for last because I often play with the numbers repeatedly, while working out the pattern. Once you update the numbers with actual numbers, you'll want to make sure you set up that area to calculate against itself, not against the raw numbers. The raw numbers are just there for reference.



For instance, in the example above, I'd change the rounded 83 to just 83, the rounded 4, to just 4, and then calculate the total number of stitches with a formula that subtracted double the decreases from the number of live stitches, which would give me the correct value.



Conclusion


It may seem a little overwhelming to follow this tutorial, but I think if you slowly build yourself up to using spreadsheets for your pattern planning, you'll find it really helpful. Feel free to play around with the sample I'm providing you. I don't know that all the calculations are 100%, but you'll get an idea of how to use it. Start small and keep experiementing. You can even manually fill in each section and just use Excel as a means to organize your data. One great way to learn more is to try user Excel to plot an existing pattern that either you or someone else created. You know your gauge and the measurements, so see if you can get the proper cast on, shaping and bind offs.


And, if you want to be really impressed, check out what a Master can do with Excel