Axis tick mark algorithm

Hi all,
I've been struggling trying to come up with a suitable algorithm for determining tick marks on an axis based on the range of values the axis should display.
For example, if my initial data set contains the values
[5,20,29,51,60,63,79,95]
I can get the Range of 90
I can specify I want, say, 5 tick marks on my axis, so my interval between marks is 90/5 = 18
so I could create an axis with values displayed of 0,18,36,54,72,90
but what I'd like to display here is 0,25,50,75,100 (ie more useful/readable values)
the axis will also have to cope with floats and negative values, so my data set could be....
[-5,-2.5,3.9,50.2, 80.9]
and if I specified ten tick marks Id want output of something like:
-10,0,10,20,30,40,50,60,70,80
If anyone has any ideas or can point me towards some source which does this kind of calculation I'd be very grateful.
Thanks in advance,
Dylan

In general, since the factor of 10 are 1,2 and 5, you want to place tic marks at units that are either 1, 2 or 5 "units" apart, where "unit" is some power of ten like .01, .1, 1, 10, 100 etc.
Secondly, if your picture has 1000 tic marks, there will be too many of them. If there is only one tic mark, or maybe two, you havent given the person enough to look at.
This argues that there should be some reasonable number of tic mark as a target that you are shooting for, like 10 or 20 or something like that.
SO - given any range, that you want to cover, and given any "unit", and given any choice of multiplier (1, 2 or 5) you could calculate how many tics it would take to cover that range.
Given a target number of tics that you think is optimal you should be able to very quickly find the unit and multiplier that gives you the optimal number of tics.
For extra beauty, draw tics that land on multiples of 10 long, draw tics that land on multiples of 5 medium and draw ones that land on anything else short.
Enjoy!

Similar Messages

  • Graph control right-hand Y-axis tick marks look like negative signs

    Hi,
    The graph control right-hand Y-axis tick marks just to the left of the numeric values that make up the scale look like negative signs.  It gets confusing for the user of the software.
    The left Y-axis is OK because the little tick marks are to the right of the number.
    Any ideas on how to improve this situation?
    Thanks,
    Kirk Mitchell
    Project Engineer
    Kollmorgen

    Perry,
    First of all thanks for looking at this.
    The tick-marks controlled by the "Mark Origin" option are not the tick marks that are causing the problem.
    The Mark Origin ticks are in the body of the graph along the x=0 and y=0 lines.  They only show up if those lines are visible such as if you have a graph with an x axis range of -100 to +100 and a y axis range of the same.
    The ticks I'm referring to are just to the left of the numeric values that label the right axis.
    Below is a screenshot to illustrate:
    Any other ideas?
    Thanks,
    Kirk

  • Script for overriding category axis tick marks in graphs?

    Hello!
    We are introducing a new graph design, but has a problem with not being able to override the tick marks in the category axis in Illustrator CS5.
    A typical graph (line layout) can have 250 observations, and since we have the tick marks on full width, the graph gets "crowded" with black lines.
    In the value axis there is possibilites for overriding the values, but not on the category axis.
    Is there any way to script so that the tick marks in the category axis can be reduced/overrided to e.g. 1 in 20?
    Please help!

    Script has NO access to live graph data… It can only break them… then fish in the group for bits…

  • X-axis tick marks and labels

    Is there a way I can apply a vertical orientation to the x-axis labels on a chart?

    David,
    This is currently not an option within xMII.  The only workaround would be to butt a html table cell up to it and have the orientation go vertical for the words.
    Regards,
    Erik

  • Less tick marks in graphs?

    Hello!
    We are introducing a new graph design, but has a problem with not being able to override the tick marks in the category axis in Illustrator CS5.
    A typical graph (line layout) can have 250 observations, and since we have the tick marks on full width, the graph gets "crowded" with black lines.
    In the value axis there is possibilites for overriding the values, but not on the category axis.
    Is there any way to script so that the tick marks in the category axis can be reduced/overrided to e.g. 1 in 20?
    Please help!

    Script has NO access to live graph data… It can only break them… then fish in the group for bits…

  • Is it possible to display a TickLabel on minor tick marks?

    I am trying to figure out whether it is possible to display a label on minor tick marks in a LineChart. I can't immediately gleam from the NumberAxis > ValueAxis > Axis javadoc how / if this could be possible to do. Tried experimenting a bit with making my own custom Axis class seeing if anything would pop when I started overriding methods, but no, not really.
    The issue I'm trying to solve is having the minor tick marks labeled on the chart when it is zoomed in. Currently, if I zoom in on a region contained between two major tick marks, there will be no axis labels at all (except the bottom left corner), which is unacceptable. I need to be able to label those minor ticks at some level of zoom to make the chart more readable.
    If anybody have any ideas on how to proceed with this problem, greatly appreciated.

    Bump. Is there any resolution for this issue?

  • Using CSS to change line chart tick mark font

    I apologize if this has been covered elsewhere, but I can't find any reference to help with this.
    I have create a dark-background theme for my CSS and have run into a bit of a blind spot with the CSS. My chart has a dark background, and I can find no way to change the color of the font on the tick marks. I have resorted for now to setting the individual axis objects setTickLabelFill for now, but it would be nice to be able to set this in CSS.
    With this, I can change the font size of the axis labels and tick marks, but the font name and color are ignored for the tick marks:
    .axis {
    -fx-font: 14px "Palatino Linotype";
    -fx-text-fill: white;
    Thank you for your help.
    - Jim
    Edited by: 871682 on Aug 2, 2011 11:47 AM

    That did work in 1.3, and I hoped it made it into 2.0, but that setting didn't help.
    Setting the -fx-text-fill in -axix-tick-mark .label doesn't work either, or any variation I tried.

  • Controling X Axis tick intervals

    I would like to control the X Axis tick intervals on a line graph. The data contains a set of values which range from 0 to 100 (a.k.a Exam Marks) and I would like to show 6 interval ticks from 1 to 100 e.g. 1-20-40-60-80-100. I can use the tickLabelSkipCount="1" tickLabelSkipFirst="1" attributes to show less ticks but I can't dictate where the ticks occur.
    <?xml version="1.0" ?>
    <Graph version="3.2.0.22" markerTooltipType="MTT_NONE" graphType="AREA_VERT_ABS">
    <O1TickLabel tickLabelSkipMode="TLS_MANUAL" tickLabelSkipCount="1" tickLabelSkipFirst="1"/>
    <O1Title text="FInal Mark" visible="true"/>
    <Title text="Mark Distribution" visible="true"/>
    <Y1Title text="No of Students" visible="true"/>
    <X1Axis axisMinAutoScaled="false" axisMinValue="0" axisMaxAutoScaled="false" axisMaxValue="100" majorTickStepAutomatic="false" majorTickStep="10"/>
    </Graph>
    Thank you

    David,
    This is currently not an option within xMII.  The only workaround would be to butt a html table cell up to it and have the orientation go vertical for the words.
    Regards,
    Erik

  • How to add tick marks to all sides of graph

    Hi,
    I'm trying to format a graph in numbers and would like to know how to add tick marks to all axies on the graph, ie. top, bottom, left & right.
    I can get tick marks on the bottom and left axis, but can't seem to find a way to add them to the others.\
    Thanks,
    Oscar

    Hi Oscar,
    Numbers 2.3, but this will work in Numbers 3.0.1 with different Inspector choices.
    When in doubt, cheat! This will give a second Y axis. It is a 2-Axis Chart (the bottom one in this screen shot of Chart Types):
    Column C (Value 2) has dummy values copied from Column B (Value 1).
    Now hide the Column graph by selecting it and changing the fill to None. (Inspector > Graphic > Fill > None).
    Set gridlines, tick marks, hide Legend as you wish.
    To add a second X axis at the top, Chart Inspector won't do that. Insert Shapes and Text Boxes?
    Regards,
    Ian.

  • How to set the number of minor tick marks?

    How does one set the number of minor tick marks? My major tick marks are located at 0, 5, 10, 15, etc. I'd like to have 4 minor tick marks in the range 0 to 5, 5 to 10, 10 to 15, etc. Is this even possible with Numbers 2.02?

    It's good that you are using a Scatter Chart for this. Just make your settings in the Inspector as shown in this example. You will be using the Chart Inspector, Axis Tab, Value Axis Settings, with the Chart selected.
    Jerry

  • Tick mark and labels

    Hello -
    I've been doing a lot of reading and not finding some answers. Maybe someone here knows...
    Does anyone know how to:
    1. On a dual Y line graph, have the tick mark labels be words instead of numbers.
    2. Instead of the horizonal line on the graph being solid and going all the way across the graph, just have a small tick mark right on the Y axis?
    Many thanks.

    David,
    This is currently not an option within xMII.  The only workaround would be to butt a html table cell up to it and have the orientation go vertical for the words.
    Regards,
    Erik

  • How to calculate the rotation degree of tick marks

    Hello Again,
    Thanks to so much help that I received here, I've been able to move right along in learning how to perform my job digitally instead of with an old camera. 
    In my last discussion, I learned out to make the tick marks using copies and rotation.  My question now is, how is the rotation calculated so A) I get the correct placement of the tick marks, especially the small ones as there are so many and B) how do I calculate the rotation degree so that I have the proper amount of space at the bottom of the guage/dial?
    Here is an image to help show what I'm asking:
    I know how to get the large tick marks and the small tick marks, if I were placing them evenly around the entire circle, I would know how to do that also - but since I'm placing them around only a portion of the circle (although still evenly) I'm lost.  I can only figure out the space by hit and miss calculations and that is taking much too long.  I would also need to know how much to rotate the entire thing by in order to get the open space at the bottom as shown.
    thanks for your help!

    You need to use transform effects and you can get this in about 10 or so minutes.
    first you need to set up the objects.
    the thick lines I used effect>distort and transform>transform 20 copies angle 14
    thi ones 100 copies angle 2,8
    G

  • Free goods tick mark coming automatically in PO?

    Hi Gurus,
    While creating PO, free goods tick mark coming automatically in PO if i m entering net price..
    I have checked material master as well as vendor master.Nowhere free good maintained in both.
    Then, why it is picking automatically in PO?
    Pls help..

    Hi
    The meaning for invoice receipt check box under invoice tab for any line item is that Po is expected Invoice for that line item.
    If this check box is not set then PO considered free items with no invoice
    So generally Invoice Receipt Check Box are kept in display mode through OMJ4 so that end user can not modify it
    Edited by: Sanjay  Shah on Feb 4, 2010 10:17 AM

  • GR based IV tick mark in PO- not able to post MIRO

    we are working for a indian client with CIN. most of the PO's which is created in SAP system with all Excise parameters and applicable taxes. further all PO's created with GR based IV check box enabled.
    now the issue is, in some of the purchases vendor is not applicable for excise, so there is no excise parameters in the PO, only tax is applicable. for this case we have not maintained vendor excise details in J1ID. but we have maintained material chapter id and CENVAT determination in J1ID. but as i mentioed earlier these PO's also with GR based IV check box enabled.
    If the PO is not excisable no Excise capturing and posting is required, for these types of PO's we are following the below steps
    1. Creation of PO with GR based IV check box enabled
    2. Goods Receipt without excise capturing
    3. Invoice verification - MIRO ( here system is not able to post the docuement because of GR based IV tick mark)
    waiting for the response

    hi,
    thanks for the response
    problem is MIRO is not posting whenever GR made with GR based IV tick in PO.
    i have checked three scenario
    scenario1.
    1. created PO with GR based IV, but there is no Excise or Tax captured in PO ( means no FV11 created)
    2. Created MIGO ( no excise parameter will appear)
    3. MIRO done with respect to MIGO
    this scenario is fine
    Scenario 2 - current scenario
    1. Created PO with GR based IV, No excise is captured in PO but Tax (VAT captured with condition type JVRD) is captured   ( means no FV11 created for VAT only)
    2. Created MIGO ( no excise parameter will appear)
    3. while doing MIRO for this scenario system is not able to post the MIRO because of the VAT in PO and GR based IV tick mark.
    Scenario 3
    1. Created PO without GR based IV, No excise is captured in PO but Tax (VAT captured with condition type JVRD) is captured   ( means no FV11 created for VAT only)
    2. Created MIGO ( no excise parameter will appear)
    3. MIRO system is picking from PO based IV. so, it is allowing to post
    need your expert advice on scenario 2 - how to post MIRO

  • I want to get windows vista on the macbook pro with retina display but my first question is this that how do i install it without using a DVD OR CD disk drive, and my second question while installing windows vista do i have to tick mark the install win 7

    hello i have a few problems and i hope somebody has a solution my first problem is that how can i install windows vista without using a disk drive and my second problem is that should i tick mark the option which says Install windows 7 while using boot camp please reply, Thanks,

    When running Windows in a virtual environment Windows and OSx share your computer's resources such as RAM. Therefore your games can not use all your computer's resources when running.
    If you install Windows natively then Windows and your games can and do use all your computer's resource such as RAM.
    But as already said, older operating systems are not supported and will not run natively using Boot Camp Assistant. You must use Windows 7 if installing natively in Lion or Moubtain Lion.

Maybe you are looking for

  • Why doesn't mail print the .ics details shown on screen?

    I have colleagues using outlook and I of course use mail. When they send me meeting requests I get a .ics file I can use in iCal. The details of the .ics file (e.g. agenda) displays OK in mail. But when I want to print the mail to take to the meeting

  • Hey everyone i have an iphone 3gs it was running on 4.0.1 and i updated to 6.0.2 but now it says your phone could not be activated?

    hi everyone i have an iphone 3gs it was running on 4.0.1 and i updated to 6.0.1. then its said i needed to restore my phone to factory settings and i did but now it says; "your phone could not be activated because the activation server is temporarily

  • Can't register my computer with icloud

    I just "upgraded" from MobileMe to ICloud. However, I have not been allowed to register my computer. I follow all the prompts and end up with the never ending rotating swirl. Please help me with simple instructions.

  • Word endnotes renumbering in CS4 problem

    I'm using Indesign CS4, and importing a Word file which has Endnotes set to restart numbering at end of each section. But when I import the numbering does not restart. So, rather than having Chapter 1, notes 1-10; Chapter 2, notes 1-5, etc. The notes

  • Remote Telenet

    Just received a new DSL modem/router, D-Link 2750B. to replace my Westell 327w.  I can see it is configured for remote Telnet administration but I do not know the username/password. When I try a remote telnet login I do get a prompt for username and