+ Reply to Thread
Results 1 to 4 of 4

Combine 2 charts with different with variable X axis

  1. #1
    Registered User
    Join Date
    11-16-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    20

    Combine 2 charts with different with variable X axis

    Hi all,

    (Please see the image attached)

    Excel Doubt.png

    I need to combine 2 different charts that I got from 2 tables but there should be a break in the X axis as the values are not consecutive. The key part is that that break is not always in the same place as the value (120 as shown in the image) can be different but always >12.

    Thanks in advance for your help!

  2. #2
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111

    Re: Combine 2 charts with different with variable X axis

    G'day and welcome,

    Have you tried putting one of the data as a 'Secondary Axis' ?

    Or this might help as well Andy Pope's Floatcluster
    Have I made you happy ??? If yes, please make me happy by pressing the http://www.excelforum.com/images/buttons/reputation-40b.png Add Reputation button in my post.
    Please don't forget to do the same to other contributors of this forum.

    Thanks
    I don't void confusion, I create it

  3. #3
    Registered User
    Join Date
    11-16-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    20

    Re: Combine 2 charts with different with variable X axis

    Please see image attached
    excel1.PNG
    It doens't really work (I think). Excel is not properly recognising which graph to plot.
    Last edited by FilipeF; 11-16-2018 at 09:14 AM.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Combine 2 charts with different with variable X axis

    Chart expert Jon Peltier does not like broken axis charts (https://peltiertech.com/broken-y-axis-in-excel-chart/ ). He prefers to use panel charts, and what I see in your "objective" picture is a panel chart -- where the left panel covers the x axis values from 0 to 20 and the right panel covers the x axis values from 120 to 140. A panel chart is pretty easy to create in Excel. See Peltier's tutorial and this tutorial https://peltiertech.com/Excel/Charts...venScales.html In those tutorials, the panels are stacking on top, but you want numeric panels "stacking" side by side. The same technique works for this, once we recognize that, in a scatter chart, the horizontal axis is a numeric value axis just like the vertical y axis in other charts. Here's how I might do this:

    1) Add a helper column to the source data to compute the x values that the chart will see. Maybe something like =IF(actual x value>break point, actual x value - break point, actual x value)
    2) Create scatter chart using the actual Y values as the Y values and the helper column from 1 as the x values.
    3) Build the table for the "dummy" series that will become the displayed X axis. Enter 0, left break point-10, right break point+10, and max display axis value into a column of 4 cells (these will be the axis label values). In the column adjacent, enter a similar formula to step 1 to get the actual x values the chart will see for the axis values. In a third column, enter 0s for the Y values for this dummy series.
    4) Add another data series to the scatter chart (I like to use the select data dialog) with the 2nd column from step 3 as the X values and the 3rd column from step 3 as the Y values.
    5) Format the second data series from step 4 to have data labels, and tell Excel to use the "value from cells" option for the data labels and use the first column from step 3 as the data labels.
    6) Other formats to clean up the chart (format the x axis to be invisible, position data labels, line and marker formats for the dummy axis, etc.)

    If I understand what you are trying to do, that's probably how I would do it.
    Last edited by MrShorty; 11-16-2018 at 01:56 PM.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 9
    Last Post: 08-07-2018, 05:50 PM
  2. Replies: 2
    Last Post: 01-22-2015, 03:51 PM
  3. Replies: 3
    Last Post: 10-09-2014, 03:21 AM
  4. Charts: Format Axis -> Axis Options -> Fixed minimum and maximum
    By johnmata in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-28-2013, 05:53 PM
  5. Replies: 0
    Last Post: 12-08-2007, 06:14 PM
  6. Replies: 0
    Last Post: 06-13-2007, 09:41 AM
  7. Hiding Values Below Z Axis Minimum Value on Axis Charts
    By TryingToExcel in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-18-2005, 11:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1