zoukankan      html  css  js  c++  java
  • excel2007vba绘图1

    参考:http://club.excelhome.net/thread-480025-1-1.html

     1 '--------------------------------------------------------Module1--------------------------------------------------------
     2 Sub Macro1()
     3     ActiveSheet.Range("B1:B40").Select
     4     ActiveSheet.Shapes.AddChart.Select
     5     ActiveChart.ChartType = xlXYScatter
     6     ActiveChart.SetSourceData Source:=Range("'Sheet5'!$A$1:$B$40")
     7     With ActiveChart
     8         .HasTitle = True                                    '为图表设置标题
     9         With .ChartTitle
    10             .Text = "交会图版"
    11             .Font.Name = "宋体"
    12             .Font.Size = 15
    13             .Font.ColorIndex = 5
    14             .Top = 5
    15             .Left = 150
    16         End With
    17         With .Axes(xlCategory)                             '为图表设置横坐标
    18             .HasTitle = True
    19             .AxisTitle.Text = "统计含量"
    20             .AxisTitle.Font.Name = "宋体"
    21             .AxisTitle.Font.Size = 12
    22             .AxisTitle.Font.Bold = False
    23             .AxisTitle.Font.ColorIndex = 1
    24             .MinimumScale = 0
    25             .MaximumScale = 60
    26         End With
    27         With .Axes(xlValue)                               '为图表设置纵坐标
    28             .HasTitle = True
    29             .AxisTitle.Text = "百分数"
    30             .AxisTitle.Font.Name = "宋体"
    31             .AxisTitle.Font.Size = 12
    32             .AxisTitle.Font.Bold = False
    33             .AxisTitle.Font.ColorIndex = 1
    34             .MinimumScale = 0
    35             .MaximumScale = 80
    36         End With
    37         .HasLegend = True                                      '为图表设置图例
    38         With .Legend
    39             .Position = xlLegendPositionRight
    40         End With
    41     End With
    42 End Sub

    参考:http://club.excelhome.net/thread-480025-1-1.html

  • 相关阅读:
    ASP.NET 生命周期(原文翻译)
    JSON 小记
    Unity5-ABSystem(二):AssetBundle导出
    Unity5-ABSystem(一):AssetBundle原理
    《Unity 3D游戏客户端基础框架》概述
    Unity中的资源管理
    Unity中的优化技术
    深入浅出聊Unity3D项目优化:从Draw Calls到GC
    Incremental builds for IL2CPP
    Unity3D图像后处理特效——Depth of Field 3.4
  • 原文地址:https://www.cnblogs.com/zhubinglong/p/7446358.html
Copyright © 2011-2022 走看看