+ Reply to Thread
Results 1 to 3 of 3

how to set horizontal axis label

  1. #1
    Registered User
    Join Date
    10-22-2012
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    43

    how to set horizontal axis label

    Hi

    I am writing out an array of double into a chart and it gives me the horizontal axis label as 1,2,..,6. But I want the text to be according to a string array with names. Can this be done? So far my code looks like

    Please Login or Register  to view this content.

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

    Re: how to set horizontal axis label

    I don't see where you are assigning anything to the .xvalues property of the series object. In a scatter plot, when nothing is assigned to .xvalues, the chart assumes you wanted the count numbers {1,2,3,4,...}.

    Is there a specific reason you are using a scatter plot? A line chart uses a category axis. In a line chart, you could assign the range containing "names" as the xvalues, and the x axis should be labeled with those string values.

    If you still need a scatter plot, you could plot a dummy series that lies on the x axis, then use Rob Xovey's XY data labeler add in (use site's search engine for link to download as it is given in many places). Plot the dummy series, then use the add in to label the points with the string array.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    10-22-2012
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: how to set horizontal axis label

    Hi
    Many thanks, it works now after I changed the chart type.!!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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