+ Reply to Thread
Results 1 to 14 of 14

Find Coordinates

  1. #1
    Registered User
    Join Date
    10-14-2018
    Location
    turkey
    MS-Off Ver
    2016
    Posts
    31

    Post Find Coordinates

    I can draw a scatter chart with specific data. But I want to do the opposite. How can I get coordinates with All points of the chart?

    help.jpg

    for example :

    points.jpg
    Last edited by sami204098; 10-21-2018 at 09:23 AM.

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

    Re: Find Coordinates

    Not much to go on. The solution will probably depend greatly on exactly what you have to start with.

    If this is a chart in a spreadsheet, then it should be a simple matter of finding the table/cells where the data for the chart is stored and reading the data points from there.
    If this is a chart from another charting application, then the answer should be the same. All of the charting applications I have seen have some kind of spreadsheet/table behind the chart where the data is stored. Figure out how to access the spreadsheet/table and read the data from there.
    The hardest scenario is when you only have some kind of picture of the chart which does not store the underlying data. For these scenarios, I put "read data from picture of chart" into my favorite search engine, which led me to learn that applications that do this are called "graph digitizers", which led to me to this blog entry from 2015 comparing 16 different graph digitizing applications: http://connectedresearchers.com/grap...ize-your-data/ He doesn't mention Excel, as I expect that these applications would export data as text (or some other format) that could easily be imported into Excel or other spreadsheet).

    Which of these scenarios best fits what you are trying to do?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

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

    Re: Find Coordinates

    Based the PM you sent me, it looks like I completely misunderstood what you are trying to do here. In the PM you explained that you have the table of XY values, but you are wanting to build a "step" chart from data you already have in the spreadsheet. You also want the step chart "conditionally formatted" so that upward steps are green and downward steps are red.

    OP's image here: https://www.mediafire.com/view/dakbl.../help.jpg/file

    I note that other tutorials have a simpler approach to step charts. Two from my go to Excel charting blogger:
    old one for older versions: https://peltiertech.com/Excel/Charts...StepChart.html
    for newer versions of Excel: https://peltiertech.com/step-charts-in-excel/
    Other tutorials with similar instructions can be found with "step chart in Excel" in your favorite internet search engine.

    Both of Peltier's approaches have a single color for the entire step chart. You want two colors. Just like other approaches to conditional formatting for charts, the key here is to use an IF() function to determine which points go with the green "up" color and which go with the "down" red color. Using the "XY scatter with error bars" type approach, this should be mostly about the =IF() function that detects the "up" and "down" points. That's how I'd probably approach this. Overview steps:
    1) Add columns to compute change in y and change in x for the error bars.
    2) Add columns for the "conditional formatting" that detect which points are up and down and put them in the appropriate column.
    3) Create chart with the column from step 2 as the 2 data series.
    4) Add error bars and format the error bars to show positive horizontal and vertical error bars based on step 1. Other formats as desired.

    If you want to stick with the approach you are currently using, most of extracting values for the chart data would be Excel's lookup function (INDEX() and MATCH() is what I would use). Are you familiar with these functions?

    How would you like to proceed?

  4. #4
    Registered User
    Join Date
    10-14-2018
    Location
    turkey
    MS-Off Ver
    2016
    Posts
    31

    Re: Find Coordinates

    I've worked with functions index and match, but please, help me solve this problem. How to extract the axis data?

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

    Re: Find Coordinates

    Is there a specific step or part that you are having difficulty with? Other than seeing multiple steps (maybe the difficulty is trying to do too much in a single function??), I don't see anything overly complex in this. Here's how I would probably set this up:

    1) Add a helper column to the main table in A and B that indicates "up" or "down". Something like =IF(A3<A4,"up","down") Assume this is in C3:C18
    2) Data_x is just point numbers in this case, and I will assume this will always be the case, for now. The leftmost column for the chart data will be a simple column of 1,1,2,2,3,3,4,4,... I'm not sure if you will need an empty row in between each -- try it both ways and see if it is needed.
    3a) The two columns for the horizontal green will be something like x column =IF(INDEX($C$3:$C$18,$D3)="up",$D3,NA()) for the first row of a number, the second row will be similar =IF(INDEX($C$3:$C$18,$D3)="up",$D3+1,NA())
    3b) The y column will be similar index function based on column A =IF(INDEX($C$3:$C$18,$D3)="up",INDEX($A$3:$A$18,$D3),NA()) and =IF(INDEX($C$3:$C$18,$D3)="up",INDEX($A$3:$A$18,$D3),NA())
    4a) Similar functions for the x column and y columns for the "riser" columns. x column =IF(INDEX($C$3:$C$18,$D3)="up",$D3+1),NA()) and =IF(INDEX($C$3:$C$18,$D3)="up",$D3+1,NA())
    4b) y column =IF(INDEX($C$3:$C$18,$D3)="up",INDEX($A$3:$A$18,$D3),NA()) and =IF(INDEX($C$3:$C$18,$D3)="up",INDEX($A$3:$A$18,$D3+1),NA())
    5) Similar functions for the red step and riser columns, replacing "up" with "down".

    To understand why I am using NA(), review this: https://peltiertech.com/mind-the-gap...g-empty-cells/

    That should be close. Where do you run into difficulty?

  6. #6
    Registered User
    Join Date
    10-14-2018
    Location
    turkey
    MS-Off Ver
    2016
    Posts
    31

    Re: Find Coordinates

    thanks but two questions:
    -Which cell write the formula written in 3a?
    -the formula written in 3a ,what is value d3 ?

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

    Re: Find Coordinates

    I envisioned inserting a column for the helper column in step 1 -- which would shift the rest of your spreadsheet to the right.
    Column D contains the numbers in step 2, starting in D3.
    I envisioned the formulas in 3a in column E, starting in E3 (with the inserted column, E1 contains the word "Green", E2 contains the "x"). These formulas are replacing the values you have entered in the red outlined cells.

  8. #8
    Registered User
    Join Date
    10-14-2018
    Location
    turkey
    MS-Off Ver
    2016
    Posts
    31

    Re: Find Coordinates

    I did according to your words, but it differs from previous data. Provide a sample file if possible. thanks

    help.jpg

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

    Re: Find Coordinates

    I won't be able to upload a sample file until much later.

    I envisioned doubled entries in step 2/column D (two 1s, two 2s, two 3s, etc), but you have entered single entries. Your scatter chart needs two point for each runner/riser segment of the step chart, so I expected each point number to be repeated in column D. Did you misunderstand what I was trying to do here, or were you trying a variation?

    I was expecting the formula in F4 to reference D4, but it looks like that is my mistake. F4 should be =IF(INDEX($C$3:$C$18,$D4)="up",INDEX($A$3:$A$18,$D4),NA()) E4 should be =IF(INDEX($C$3:$C$18,$D4)="up",$D4+1,NA()). Similar corrections for the other columns.

    Did you understand how I was using the INDEX() function to extract the values from the table? You indicated earlier that you have worked with INDEX() before, so I assumed you would be familiar with how it works. Perhaps your question is less about the basic syntax and use of these functions, and more about the programming logic part of determining the desired row number from the point number.

  10. #10
    Registered User
    Join Date
    10-14-2018
    Location
    turkey
    MS-Off Ver
    2016
    Posts
    31

    Re: Find Coordinates

    Can you put the sample file ,To better understand and learn.

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

    Re: Find Coordinates

    It's still going to take a while before I have a chance to build a sample and upload it. In the meantime, is there a specific step or part of my use of the INDEX() function that you are having trouble understanding?

  12. #12
    Registered User
    Join Date
    10-14-2018
    Location
    turkey
    MS-Off Ver
    2016
    Posts
    31

    Re: Find Coordinates

    I can not get to the points I want to draw.With the explanation you provided, I could not draw the chart.

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

    Re: Find Coordinates

    If we get the first runner/riser pair to work, the rest should be mostly copies of those. Tell me what you get if you (working from the picture in post 8):

    1) Enter 1 in D3 and 1 in D4
    2) Enter =$D3 in E3 and =$D4+1 in E4
    3) Enter =INDEX($A$3:$A$19,$D3) into F3 and copy into F4 (F4 should be =INDEX($A$3:$A$19,$D4)
    4) Enter =$D3+1 into G3 and copy into G4 (G4 should be =$D4+1)
    5) Enter =INDEX($A$3:$A$19,$D3) into H3 and =INDEX($A$3:$A$19,$D4+1) into H4.

    Ignoring all of the up down coloring and such, does that get you a single runner/riser pair connecting point 1 and 2?

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

    Re: Find Coordinates

    I'm still not sure what you are having trouble with. Here's a sample file with some random data. I started to build the lookup rows, but you will need to make copies of those rows as far down as needed. Also note how I started with the formulas from the previous post for a single runner/riser pair, nested them inside of IF() function to choose up or down. With the correct mix of relative and absolute references, it should be a simple matter of copying down (continuing to include the blank row between sets).

    If interested, I also included an tab showing how to do this using the error bar technique illustrated in the other tutorials. It seems a lot easier (or, at least, more compact).
    Hopefully that helps you understand the thought process for developing something like this.
    Attached Files Attached Files

+ 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. Find/count special coordinates and their value
    By tomassitoo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-13-2018, 02:00 AM
  2. Find coordinates of a line shape
    By Will T. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2017, 04:20 PM
  3. [SOLVED] find gene name that overlap with start/end coordinates
    By Marwah in forum Excel General
    Replies: 8
    Last Post: 07-08-2017, 11:43 AM
  4. find grid coordinates for particular data
    By Traymond in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-24-2016, 05:01 PM
  5. Replies: 5
    Last Post: 10-02-2015, 05:38 PM
  6. Replies: 7
    Last Post: 07-29-2013, 04:51 PM
  7. [SOLVED] VBA to find cell with a specific value, and ID its coordinates
    By artkingjw in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-29-2012, 01:17 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