Repository: bokeh/bokeh

Issue:
Need more control over ticks and gridlines
I'm trying to reproduce a graph known in audiology as a tone audiogram. It is a graph of hearing sensitivity (in Decibel) vs frequency (Herz).

It has some peculiar requirements:
1. vertical (decibel) axis is inverted with specific major grid lines. 
2. horizontal (frequency) axis is in fact a log axis but its ticks are linear, and should only show the ticks/gridlines 125, 250, 500, 2000, 4000, 8000 (note the doubling of frequency values).
3. the aspect ratio should be such that a the area bounded by 20 dB and a frequency doubling (say 250-500, or 4000-8000 Hz) is square.

1 is not a problem in Bokeh. 3 could be achieved (more or less) by fiddling with the plot size. 
2 is the real challenge. Ideally I'd like to specify exactly which ticks and gridlines are drawn (eg by specifying a list of values).

![formulier_-_toon-_en_spraakaudiogram_-_1_2_pdf__1_page_](https://cloud.githubusercontent.com/assets/1711378/8647350/81f8979a-2957-11e5-8aa6-834172b47ee9.png)



Discussion:
It would be fairly straightforward to work up an `FixedValuesTicker` (or perhaps a better name) that simply takes an explicit list of tick locations and only results in ticks at those locations. Would you be interested in working up a Pull Request to add this feature? We are always eager to help anyone get started with Bokeh development. 

I'd love to but would not have a clue where to start. 
On a previous occasion I perused the source code to make sense of something because the docs still need improvement (no offence, I know you are doing your upmost!) and had trouble locating the relevant code. Maybe because some/most code is implemented in javascript?
So I may be of limited use. I can contribute by testing if you want. 

Yes a basically all the implementation is in JS (CoffeeScript, really). Will make sure to ping this issue when there is a PR so you can take a look. 

Sincere side question: Pretty much every single knob and lever that can be fiddled with is documented now in the User's Guide (e.g. http://bokeh.pydata.org/en/latest/docs/user_guide/styling.html#userguide-styling), together with a live plot and code sample and explanation. But there are still often complaints about the docs. I'm not sure what else to add at this point, though, so I would appreciate any feedback about what would make them better, more accessible or easier to use. 

Good question. I don't really have a good answer. Though I have trouble with the docs, I do not really know what's wrong. My guess is that when I want to create some graph, I apparently have trouble finding what I need. 

Some observations (from memory): 
- there is useful info in quick start, user guide, tutorial, dev guide, gallery. That's too many places. 
- the difference between the high level and basic level API is confusing to me. Not in principle of course. High level is the canned charts, mid-level is referred to as _basic_ glyphs (sounds like low level to me). Low-level is not meant for users (right?). There is overlap in names (except for capitalization: line vs Line) in the examples. Make the API levels more distinct in the rest of the docs.  
- the ref guide is confusing. Could use more explanation on valid uses and values of params/attrs. There's a ton of modules and nested modules (not so nice for beginners). Not all modules are visible in the toplevel of the dev guide. 
- The information on Palettes is inadequate. 
- I found the Google custom search results too noisy.

That's it for now ;-)

Thanks for the detailed feedback. Will definitely keep these in mind. I will make a few observations, tho:
- People learn differently, and everyone wants to see particular (different) kinds of resources suited to their learning style. Previous complaints from users were about: not having a gallery, not having a users guide, not having a tutorial, not having a quickstart. I don't expect there is a single combination that will satisfy everyone. For better or worse, to benefit the most people in aggregate, I think "more" is probably the only viable option. But I am sure we can do a better job of helping folks navigate. 
- Reference guides are always specifically not beginner materials. That's just the nature of reference guides. References are a place to go get full, specific details when you already have some idea what you are looking for. 
- There's really nothing in the Dev guide that should be of interest to causal users. Maybe we ought to just remove it from the main docs site. 

Not sure how this got closed.

I agree with most of your comments. Better guidance will do a lot. However ppl asking for more might actually be ppl not finding what might already be there or not understanding it.
Ref guides are definitely not beginners' material. They should be crystal clear and complete however, which they are not yet (I'm not harsh, I know how hard this is!).


Resolving patch:
diff --git a/bokeh/models/tickers.py b/bokeh/models/tickers.py
--- a/bokeh/models/tickers.py
+++ b/bokeh/models/tickers.py
@@ -5,7 +5,7 @@
 from __future__ import absolute_import
 
 from ..plot_object import PlotObject
-from ..properties import Int, Float, List, Instance
+from ..properties import Int, Float, Seq, Instance
 
 class Ticker(PlotObject):
     """ A base class for all ticker types. ``Ticker`` is
@@ -28,6 +28,19 @@ class Ticker(PlotObject):
         as can be, in the context of a specific ticking strategy.
     """)
 
+class FixedTicker(Ticker):
+    """ Generate ticks at fixed, explicitly supplied locations.
+
+    .. note::
+        The ``desired_num_ticks`` property is ignored by this Ticker.
+
+    """
+
+    ticks = Seq(Float, help="""
+    List of tick locations.
+    """)
+
+
 class AdaptiveTicker(Ticker):
     """ Generate "nice" round ticks at any magnitude.
 
@@ -43,7 +56,7 @@ class AdaptiveTicker(Ticker):
     The multiplier to use for scaling mantissas.
     """)
 
-    mantissas = List(Float, [2, 5, 10], help="""
+    mantissas = Seq(Float, [2, 5, 10], help="""
     The acceptable list numbers to generate multiples of.
     """)
 
@@ -64,7 +77,7 @@ class CompositeTicker(Ticker):
 
     """
 
-    tickers = List(Instance(Ticker), help="""
+    tickers = Seq(Instance(Ticker), help="""
     A list of Ticker objects to combine at different scales in order
     to generate tick values. The supplied tickers should be in order.
     Specifically, if S comes before T, then it should be the case that::
@@ -87,7 +100,7 @@ class DaysTicker(SingleIntervalTicker):
     """ Generate ticks spaced apart by specific, even multiples of days.
 
     """
-    days = List(Int, help="""
+    days = Seq(Int, help="""
     The intervals of days to use.
     """)
 
@@ -95,7 +108,7 @@ class MonthsTicker(SingleIntervalTicker):
     """ Generate ticks spaced apart by specific, even multiples of months.
 
     """
-    months = List(Int, help="""
+    months = Seq(Int, help="""
     The intervals of months to use.
     """)
 
diff --git a/sphinx/source/docs/user_guide/source_examples/styling_fixed_ticker.py b/sphinx/source/docs/user_guide/source_examples/styling_fixed_ticker.py
new file mode 100644
--- /dev/null
+++ b/sphinx/source/docs/user_guide/source_examples/styling_fixed_ticker.py
@@ -0,0 +1,10 @@
+from bokeh.plotting import figure, output_file, show
+
+output_file("axes.html")
+
+p = figure(plot_width=400, plot_height=400)
+p.circle([1,2,3,4,5], [2,5,8,2,7], size=10)
+
+p.xaxis[0].ticker=FixedTicker(ticks=[2, 3.5, 4])
+
+show(p)


Test patch:
diff --git a/tests/travis/test.yaml b/tests/travis/test.yaml
--- a/tests/travis/test.yaml
+++ b/tests/travis/test.yaml
@@ -6,7 +6,7 @@
 - path: "charts"
 - path: "plotting/file"
   type: file
-  skip: ["image.py", "image_rgba.py", "ajax_source.py"]
+  skip: ["image.py", "image_rgba.py", "ajax_source.py", "choropleth.py"]
 - path: "plotting/server"
   type: server
   skip: ["image.py", "image_rgba.py", "remote_image.py", "serversource.py", "server_source_upload.py", "embedding_example.py", "abstractrender.py", "census.py"]