+ Reply to Thread
Results 1 to 1 of 1

Thread: Center y axis

  1. #1
    Registered User
    Join Date
    08-31-2011
    Location
    Tokyo
    MS-Off Ver
    Excel 2010
    Posts
    46

    Question Center y axis

    I would like to center the y axis to 0 ([-1.7;1.7]), I tried to use Axes(xlCategory).CrossesAt but it gives me an error. For test, I used it on the x axis : Axes(xlValue) and it works.

    For debug, I printed the value of Axes(xlCategory).CrossesAt when set at minimum, it shows 1, I dont understand why. (the minimum should be -1.7)

    With Graph2
        .Activate
        .name = "Scatter result"
        .ChartType = xlLineMarkers
        .Axes(xlCategory).Crosses = xlMinimum
        .Axes(xlValue).Crosses = xlAxisCrossesAutomatic
        .SeriesCollection.NewSeries.XValues = Array(p1data)
        .SeriesCollection.NewSeries.Values = Array(p2data)
        .SeriesCollection(1).Format.Line.Visible = True
        .SeriesCollection(2).Format.Line.Visible = False
    End With
    MsgBox Graph2.Axes(xlCategory, 1).CrossesAt
    Thank you for your help in advance

    EDIT : I have finally found my mistake, I have created two different series with NewSeries ... sorry to pollute the forum...
    Last edited by oro77; 09-14-2011 at 03:01 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0