Multiple Plot areas in one chart area

I have a multiple line chart that uses both vertical axises where the range changes regularly for each series.  I set both axises to the desired setting so that one line (the one that used the left axis) is always on top of the other (right axis).  But as soon as I change the source data, the lines go back to overlapping.  Is there a way to have one line chart always be on top of the other so that they aren't touching regardless of ranges?  I thought of having multiple plot areas within one chart but i didn't see any options for that.  thanks in advance.
0
anonymous (74717)
11/12/2003 7:21:10 PM
excel.charting 18370 articles. 0 followers. Follow

2 Replies
964 Views

Similar Articles

[PageSpeed] 57

Zac -

You could use a macro to change the axis scales for you.  This simple 
example squashes the working range of the primary axis into the bottom 
half of the chart, and the working range of the secondary axis into the 
top half of the chart:

Sub ReSetDualAxes()
     Dim i As Integer
     With ActiveChart
         For i = 1 To 2
             With .Axes(2, i)
                 .MajorUnitIsAuto = True
                 .MaximumScaleIsAuto = True
                 .MinimumScaleIsAuto = True
                 .MajorUnit = .MajorUnit
                 .MaximumScale = .MaximumScale
                 .MinimumScale = .MinimumScale
                 If i = 1 Then
                     .MaximumScale = 2 * .MaximumScale _
                         - .MinimumScale
                 Else
                     .MinimumScale = 2 * .MinimumScale _
                         - .MaximumScale
                 End If
             End With
         Next
     End With
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

Zac wrote:
> I have a multiple line chart that uses both vertical axises where the range changes regularly for each series.  I set both axises to the desired setting so that one line (the one that used the left axis) is always on top of the other (right axis).  But as soon as I change the source data, the lines go back to overlapping.  Is there a way to have one line chart always be on top of the other so that they aren't touching regardless of ranges?  I thought of having multiple plot areas within one chart but i didn't see any options for that.  thanks in advance.

0
11/13/2003 2:35:53 AM
Zac -

After running the code a couple times, I realize a minor change to the 
..MajorUnit makes the chart look less cluttered.  Whenever you set a new 
source data range for the chart, select the chart and run the macro.

Sub ReSetDualAxes()
     Dim i As Integer
     With ActiveChart
         For i = 1 To 2
             With .Axes(2, i)
                 .MajorUnitIsAuto = True
                 .MaximumScaleIsAuto = True
                 .MinimumScaleIsAuto = True
                 .MajorUnit = 2 * .MajorUnit
                 .MaximumScale = .MaximumScale
                 .MinimumScale = .MinimumScale
                 If i = 1 Then
                     .MaximumScale = 2 * .MaximumScale _
                         - .MinimumScale
                 Else
                     .MinimumScale = 2 * .MinimumScale _
                         - .MaximumScale
                 End If
             End With
         Next
     End With
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

Jon Peltier wrote:
> Zac -
> 
> You could use a macro to change the axis scales for you.  This simple 
> example squashes the working range of the primary axis into the bottom 
> half of the chart, and the working range of the secondary axis into the 
> top half of the chart:
> 
> Sub ReSetDualAxes()
>     Dim i As Integer
>     With ActiveChart
>         For i = 1 To 2
>             With .Axes(2, i)
>                 .MajorUnitIsAuto = True
>                 .MaximumScaleIsAuto = True
>                 .MinimumScaleIsAuto = True
>                 .MajorUnit = .MajorUnit
>                 .MaximumScale = .MaximumScale
>                 .MinimumScale = .MinimumScale
>                 If i = 1 Then
>                     .MaximumScale = 2 * .MaximumScale _
>                         - .MinimumScale
>                 Else
>                     .MinimumScale = 2 * .MinimumScale _
>                         - .MaximumScale
>                 End If
>             End With
>         Next
>     End With
> End Sub
> 
> - Jon
> -------
> Jon Peltier, Microsoft Excel MVP
> http://www.geocities.com/jonpeltier/Excel/index.html
> _______
> 
> Zac wrote:
> 
>> I have a multiple line chart that uses both vertical axises where the 
>> range changes regularly for each series.  I set both axises to the 
>> desired setting so that one line (the one that used the left axis) is 
>> always on top of the other (right axis).  But as soon as I change the 
>> source data, the lines go back to overlapping.  Is there a way to have 
>> one line chart always be on top of the other so that they aren't 
>> touching regardless of ranges?  I thought of having multiple plot 
>> areas within one chart but i didn't see any options for that.  thanks 
>> in advance.
> 
> 

0
11/13/2003 2:41:41 AM
Reply:

Similar Artilces:

compute one of two missing value?
I want to create a table like this: column A is the name of the person column B is height in feet column C is height in meters How do I set it up so that if I enter a number in the feet column, excel would calculate and fill in the meter column, and if I fill in the meter column, excel would calculate and fill in the feet column? use a worksheet_change event if target.column=2 then target.offset(,1)=target*_____ if target.column=3 then target.offset(,-1)=target/_____ -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett@gmail.com "james" <nospa...

Show only workdays in chart axis?
Hi, I have created a dynamic named-range that I use as the data source for my scatter plot chart's x-axis. I only type in dates that are workdays in that range. When I graph my data the chart is still showing the weekends, just with no data points in there. It is stretching my graph out and skewing the look. Is there a way to set the graph to only show weekdays and just skip the weekends? Thanks! -Dan I should add I have tried right-clicking on the chart -> chart options -> axes -> and trying to select the Category radio button but it is grayed out, possibly because I a...

Removing multiple hyperlinks
I've got data copied into my spreadsheet that includes hyperlinks. Ther are thousands of these in a column. I can remove individually by right-clicking and selecting Hyperlink an Remove. I can then arrow down and do a control Y, cell by cell, What I want to do is highlight the column and be able tp remove th hyperlinks all at once. I've exhausted myself peering through knowlegebases and groups, bu cannot find any way to make this work. Thanks for any input you can provide -- Message posted from http://www.ExcelForum.com Hi one way: Use the following macro to remove hyperlinks...

Create a list with multiple criteria
I have a data base with 1,000's of addresses w/zipcodes (Sheet 1 columns A to E, E being zipcodes). After setting a base address I get all of the zipcodes within a given radius (in this case 70 zipcodes), listed in Sheet 2, Column A. Next, I use COUNTIF (in column B) to find how many addresses are in each zipcode, in this example there are 46 addresses within the 70 zipcodes. What I want to do is create a list in sheet three that will list each with the data from Sheet 1 columns A to E). Any help would be appreciated. Ronbo ...

Display Missing Data Labels as N/A on a Chart
I am displaying values as the data labels in a chart but missing values are displayed as 0's. Is there a way to display them as N/A instead? ...

Charting multiple multiples
Hopefully I can explain this in a way that will be understood. Data: Place A Place B Place C FWD Back FWD BACK FWD Back Org_1 1 2 3 2 1 3 Org_2 2 5 4 6 1 4 I would like to place the data so that FWD and Back data is stacked on top of each other in different colors, and placed in one row on a 3-D chart as Org-1 and a second row as Org_2. Any ideas? Thanks. If you arrange your data like this: Back FWD Org_1 Place A 2 1 Place B 2 3 Place C 3 1 Org_2 Place A 5 2 ...

Multiple Hyperlinks In Same Shape Doesn't Work
Can anyone tell me how I can get multiple hyperlinks in the same shape to work? I have no problem inserting the hyperlinks, but they all point to only one. I scoured these posts, and found this (http://groups.google.com/groups?q=hyperlink+group:microsoft.public.visio.*&hl=en&lr=&ie=UTF-8&oe=UTF-8&group=microsoft.public.visio.*&selm=3eea6467%241%40news.microsoft.com&rnum=2), which doesn't appear to work. Thanks in advance-- RAD Um, which version of Visio are you using? As far as I know, at least Visio 2002 and Visio 2003 support multiple hyperlinks. Can't...

Distorted Excel chart fonts when copy/paste to Word or Powerpoint
Since a few weeks I'm having a problem with Excel charts. First of all, the y-axis title is cut-off after 6-7 characters on the display screen, although it prints correctly. Second, when I copy and paste the chart into e.g. Word or Powerpoint the chart fonts appear 'distorted'. The workaround for this problem is to first print the chart to a PDF file and then copy and paste the PDF file, but this is cumbersome. Does anyone know what might be causing this erroneous behavior? One theory (suspicion) is that the problems started after I used MS Chart (which I normally never use) ...

Hiring in the Bay Area....any suggestions???
Hi, I'm an internal Recruiter at Shutterfly, a direct to consumer online photo and personal publishing service in Redwood City, CA. We are trying to hire an IT Manager and a Sr. ERP Administrator. Does anyone have any suggestions on places to advertise for admin that specialize in Great Plains? Or do you happen to know of anyone who's looking? If so, please feel free to share my contact information. :) Descriptions can be reviewed at: IT Manager: http://www.shutterfly.com/about/emp_sub_0703081243.jsp Sr. ERP Administrator: http://www.shutterfly.com/about/emp_sub_0703081236....

PivotChart will not preserve series formatting for some charts when reopening workbook
I have a WB with 4 PivotCharts. When I close and reopen the WB, 2 of my PivotCharts have slightly skewed formatting. Can somone help determine why? Details: PTable 1 / PChart 1, PTable 2 / PChart 2 all based on static data in Sheet 1. PTable 3 / PChart 3, PTable 4 / PChart 4 all based on static data in Sheet 2. All PTables were created from a new PCache object. I'm using any single data cache for more than 1 PTable. When I reopen, PChart 1 and PChart 3 have the following problem: - Series order goes back to the default order. - Series colors remains in the old order. 1. I know that...

Multiple Profiles, multiple accounts, multiple machine configuring?
Is there a vb or related method of adding *both* profiles *and* email accounts to multiple users logins from the administrator account? I have a network which is a workgroup (NOT a domain), in which there are about 15 users that are replicated on each of 5 machines. I'd like to be able to add all 15 Mail Profiles, and all 15 email accounts to each of the 15 logins on these 5 machines--obviously with as little work as possible. The mail is all retrieved from the same Exchange Server, but these machines *cannot* be added to a domain (don't ask!). I'd hate to have to log into ...

distributing data into multiple cells
hii i have to prepare an exel sheet of some 2000 products..i have to copy d data from the net and then prepare the sheet,with 4 different columns for 4 diff types of entries..now when i copy data nad paste is as text.it all goes in a single cell in a row .how can i distribute the data l into multiple cells????????? -- jaspreet ------------------------------------------------------------------------ jaspreet's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=23821 View this thread: http://www.excelforum.com/showthread.php?threadid=374772 can you show some samp...

Single click selects multiple cells
When clicking on a single cell multiple cells are selected. The one time solution for this is to zoom in or out. This is problematic as 60% seems to be the zoom that works most of the time but at this zoom level the cell contents do not display. The time lost and the frustration that builds is killing my productivity and office attitude. Please give all of us a permanet fix. -- Thanks Mike ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" butt...

Is there a way to sort multiple columns with a tab or something?
I have a 4 column spreadsheet. I want to be able to click the heading for each of the columns to hav them sort by that column if clicked. How do I do that -- Message posted from http://www.ExcelForum.com Hi why not used the soprt icon for this. Note: This could screw up your sorting if Excel does not recognize your database columns correctly -- Regards Frank Kabel Frankfurt, Germany > I have a 4 column spreadsheet. > > I want to be able to click the heading for each of the columns to have > them sort by that column if clicked. How do I do that? > > > --- > Mess...

Sending to multiple addresses
How do I send an email to multiple addresses having only the recipient see their own email address? Michelle wrote: > How do I send an email to multiple addresses having only > the recipient see their own email address? Put the addresses into the BCC: field. Note that many e-mail programs will decide such mails are spam though. >-----Original Message----- >How do I send an email to multiple addresses having only >the recipient see their own email address? >. Open your new email and go to tools, select recipient, when your address book opens select (highlight) the a...

Windows will not "Tile" when one of them has Money Plus open
I've discovered that I cannot get my windows to "Tile" when using Money Plus. This is a big bummer because that is how I update my 401k account (not on any exchange so I must do it manually) I copy/paste info into it (money) and it is so much easier if I can tile windows. I used to do it all the time with my older MM Deluxe 2004. Funny thing is that the Money window tiles but the other one acts just like when you click "Tile Windows" when there is only one open... "bupkiss" just a 'bleep' and back to fully maxed... any ideas? On Wed, 5 Sep 2...

Convert data into one WrapText cell
User's data is as follows: G Data......................... 4 no 5 20 more Data ............... etc where G through 20 is in a single row, and therefore Data occupies 3 rows. I believe this gives me a complete record where the Data occupies more than one row: Sub TestConvertToWrapText() Dim Cell As Range, StartRw As Long Dim EndRw As Long For Each Cell In ActiveSheet.Range("B2:B33") If Not IsEmpty(Cell) Then StartRw = Cell.Row If Not IsEmpty(Cell.Offset(1, 0)) Then EndRw = Cell.End(xlDown).Row...

scatter chart x axis problem
The data is in three columns. My client wants the values in column 1 to also be the x-axis values. Is this possible? Nothing that I have tried has worked. Thanks in advance. Suzan Suzan - If you're making an XY Scatter chart, Excel automatically uses the first column as the X values, and uses the rest of the columns for Y values for one less series than you've selected columns. If you're making a line chart, Excel usually uses each column of data as Y values for another series, and uses counting numbers (1, 2, 3,..) for the category values. To help Excel realize what you...

Exchange 2000 Distribution Lists
Hello We are running an Exchange 2000 environment in Exchange Native Mode and Windows Mixed Mode. We just converted from Exchange 5.5 Is there any way to configure multiple people to be owners or editors of the distribution lists? This was possible in 5.5, but we cannot find a means of accomplishing this in 2000 Any help would be appreciated Thank yo Jason "Jason P.S." <jason.pruden-shebaylo@investorsgroup.com> wrote: >We are running an Exchange 2000 environment in Exchange Native Mode and Windows Mixed Mode. We just converted from Exchange 5.5. > >Is there any w...

multiple selection
How can I select multiple records into a list box? I want that for append identical records (for select records) in another table. Many thanks Florin Use a subform instead of a list box. In a subform bound to a related table, you can append as many rows as applicable. It is possible (but not simple) to use an unbound multi-select list box that is populated in the Current event of the form, and executes Append, Delete, and Update query statements based on the ItemsSelected if they are changed. You will also have to find a way to respond to the user "undoing" changes. -- Al...

Export Chart in Vector Format
That's a tough one! I am trying to copy a chart from Excel to CorelDraw and process it but without success. I know how to export as bmp, tiff, jpg etc, but I don't want an image. I want the vectors (boxes, lines, curves, text etc) so that I can process them in a vector application such as CorelDraw. I tried to export in wmf and emf (which is something that Excel does not do by itself - you need to do it through powerpoint) but these formats are not imported completely in CorelDraw. Usually I just get a couple of objects (eg. the background of the chart), without axes, column...

Need to have a dropdown list containing multiple rows
I am setting up an form and need to create a dropdown list that will contain 8 sets of data. Each set needs to contain 3 rows of data (name, street address & city/state/zip. The goal is to allow the user to click onto the cell, see the dropdown and select which address set to use. This would then place the data into three rows suitable for mailing. I have never attempted anything like this and am in need of assistance. Thank you. --- Message posted from http://www.ExcelForum.com/ Pat What you ask is easily done using Data Validation drop-down list and a few Vlookups but........Ex...

Changing color of a single gridline on a chart
I need to change the color of a single grid line on a chart. This is currently not allowed (at least I am not able to). When you change color all the grid lines take the same color. I need to change the color of a single grid line. Please help if you know the answer. You can't colour one gridline, but Jon Peltier has instructions for adding a horizontal line to a chart: http://www.geocities.com/jonpeltier/Excel/Charts/ComboCharts.html#AddLine Anise Ahmed wrote: > I need to change the color of a single grid line on a > chart. This is currently not allowed (at least I am no...

Multiple domains #6
Hi, Having done some research I have found that it is possible to send and receive email from multiple domains with Exchange 2003. I have a few questions that I would like cleared up if anyone can help. 1. Is it really as simple as configuring a recipient policy for the new domain and then changing the mail record for that domain to point to the proper IP address? 2. If I set up a new account in AD, and need this account to be associated with the second email domain, will the default SMTP email be for the first domain? If so, can I just edit this directly? 3. If I set the default SMTP add...

Combine multiple tables into one
I took over a database in which the last person created a new table for everyday worth of data (ie. Feb-21-08 is named 022108). There are over 100 tables in the single database with the same columns and table attributes, I would like to combine all of these tables into one where I have a Date_Key field in place of the table name. I figured out how to query the table names using the following: SELECT MSysObjects.Name FROM MsysObjects WHERE (Left$([Name],1)<>"~") AND (Left$([Name],4) <> "Msys") AND (MSysObjects.Type)=1 ORDER BY MSysObjects.Name; Now I j...