MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Feb 20th, 2002, 12:55 PM   #1
saydan
New Member
 
Join Date: Feb 2002
Posts: 6
Default

I was wondering if anyone else has faced this problem and has come up with a solution.

I created a XY Scatter chart in Excel 97 and the X axis is the date, and the Y is the temperature. The min/max for the X axis is set to auto select but the Y min is 1/1/1979 and the max is 1/1/2003. The major unit is 730.5 and the minor unit is 365.25. This should display everyother year on the X axis, but instead it shows 79,80,83,84, and so on. Is there away around this problem but by still us the same date values?
Thanks,
dan...
saydan is offline   Reply With Quote
Old Feb 20th, 2002, 01:10 PM   #2
Anne Troy
MrExcel MVP
 
Anne Troy's Avatar
 
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
Default

Did you right-click the X axis and choose format, then set the major unit to 365? If you're using actual DAY dates, you may want to just show the month/year or just year (use formatting on the column that represents the years).
Anne Troy is offline   Reply With Quote
Old Feb 20th, 2002, 03:14 PM   #3
saydan
New Member
 
Join Date: Feb 2002
Posts: 6
Default

yes I clicked on the X axis and set the major unit to 365.25 and it gives me the the incorrect years along the bottom. When I set the minimum value to 1/1/1978 it displays it correctly. It just doesn't display it correctly if the data is 1/1/1979.
The date values it is ready in is formatted to only display the year (yyyy).
saydan is offline   Reply With Quote
Old Feb 20th, 2002, 04:00 PM   #4
Denise
New Member
 
Join Date: Feb 2002
Location: M&T Bank
Posts: 18
Default

Three things:
1- I don't think there is any reason to use an XY graph in this case. Try line graph. It may help if excel read the dates as labels.

2- There is an option that allows you to specify units on the x axis.

3- I've had graphs that displayed every other month and every other year because the graph area simply wasn't large enough. Reducing the font size for the x axis also helps this sometimes.

Good luck,
Denise
Denise is offline   Reply With Quote
Old Feb 21st, 2002, 03:52 PM   #5
saydan
New Member
 
Join Date: Feb 2002
Posts: 6
Default

No this isn't the problem at all.
I can mak
The problem is the when the starting date is
1/1/1979 and the ending date is 1/1/2003 it will plot the values incorrectly. However if I change the starting date (and only that ) to 1/1/1978 it will display the data correctly.
saydan is offline   Reply With Quote
Old Feb 21st, 2002, 04:02 PM   #6
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

Don't you think this might have something to do with the fact that 1980 is a leap year, and 1 day is added on a leap year rather than 0.25 day each year. So if you start with an odd numbered year your minor and major units are out of phase.


[ This Message was edited by: Mark W. on 2002-02-21 15:06 ]
Mark W. is offline   Reply With Quote
Old Feb 21st, 2002, 04:16 PM   #7
saydan
New Member
 
Join Date: Feb 2002
Posts: 6
Default

I also thought it was because the years were odd numbers but then I set the starting year to 1980 then I get the same problem, and if I set the starting the date to 1981 it is ok.
saydan is offline   Reply With Quote
Old Feb 21st, 2002, 04:35 PM   #8
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

Okay, okay... I shouldn't have mentioned "odd" years in my response. The point is: According to the Gregorian calendar each year isn't 365.25 days long. Let's create a quick model to explain what's happening...

Enter 1/1/78 into A1 and create a year-based series ending in cell A12 with 1/1/89 [I used =EDATE(A1,12)]. Next, enter the formula, =A1+365.25, into B2, the formula, =B2+365.25, into B3 and copy down to B12. Finally, enter the formula, =TRUNC(B2)=A2, into C2 and copy down to C12. Notice, that the column B value which should be predictive of the column A value is wrong (column C is FALSE) every 4 years. (I applied a color pattern to the odd numbered rows to help me identify the alternating years that would be graphed.) Furthermore, notice that with 1978 as the base year it's wrong in 1981, 1985, etc., and that these years aren't displayed on your XY Chart using 1978 as its base. The discrepancies are there, but you're not displaying them!!! If you begin with 1979 the XY Chart displays the discrepancies. It's a "phasing thing"! Does this make sense?


[ This Message was edited by: Mark W. on 2002-02-21 16:22 ]
Mark W. is offline   Reply With Quote
Old Feb 21st, 2002, 04:52 PM   #9
saydan
New Member
 
Join Date: Feb 2002
Posts: 6
Default

So what would be teh best way to over come this problem.
Is there a way to get my X axis to show every other year correctly all the time no matter what the starting year is?
saydan is offline   Reply With Quote
Old Feb 21st, 2002, 04:59 PM   #10
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

As Denise suggested... use a Line chart.
Mark W. is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 06:04 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes