Results 1 to 3 of 3

A should be simple graphical function

Threaded View

  1. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: A should be simple graphical function

    Have you looked at PyPlot? It can do what you want, but it is a programming tool, which you may be more comfortable with. http://matplotlib.org/gallery.html

    As for Excel, you need to use a line plot. Let's say you have your data like this:
    London 0 1 2 8 4
    NewYork 0 3 5 6 8
    Paris 0 1 3 4 9

    The first column of 0 is required and is your 'dummy' row so that your y-axis starts at 0.
    Plot that data as a line plot with markers. You may need to hit the 'Switch Row/Column' button in the Chart Tools->Design tab. That should put the city labels along the x-axis and then have the appropriate points above each one. Now you need to get rid of the lines and make the markers into whatever you want (I chose orange dots). You will need to right click each line (series) and then choose to have no line and change the marker to what you want. That is tedious. I wrote a quick macro that will go through each series of the active chart and do that for you:
    Sub LineChange()
    Dim ser As Series
    
    For Each ser In ActiveChart.SeriesCollection
        ser.Format.Line.Visible = msoFalse
        ser.MarkerStyle = 8
        ser.MarkerSize = 6
        ser.Format.Fill.Solid
        ser.Format.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent6
    Next
        
    End Sub
    I wrote that code with no real error recovery or intelligence. You MUST select the chart you want to change (just click on it) and then run the macro. You will then need to do the manual task of right-clicking on the markers on the x-axis (i.e. the 0's) and making the markers 'None'.

    I have attached a sample spreadsheet (with the macro - called LineChange) to get you started.

    Note: to run macros you probably need to enable the 'Developer Mode' in Excel. Google the web and you will find a website with pretty pictures to show you how.
    Attached Files Attached Files
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Datewise graphical representation
    By durga_ikon in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-14-2014, 01:14 AM
  2. Create a simple graphical image from excel input
    By T5fWhite in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-28-2010, 07:06 AM
  3. Graphical window in a worksheet
    By MaxAlbertsson in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-24-2007, 04:56 AM
  4. Graphical Representation
    By cityinday in forum Excel General
    Replies: 4
    Last Post: 03-19-2006, 12:44 AM
  5. graphical problems
    By Damsel in distress in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-05-2005, 10: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