Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scaledAxis does not honor bounds #215

Open
dschrempf opened this issue Mar 4, 2020 · 1 comment
Open

scaledAxis does not honor bounds #215

dschrempf opened this issue Mar 4, 2020 · 1 comment

Comments

@dschrempf
Copy link

Hi,

when creating a plot with layout_y_axis . laxis_generate .= scaledAxis def (3, 28), the resulting plot has a y range from 0 to 30. I guess this is because the ticks are at 0 and 30. How can I create a plot with a specific axis range?

Thanks!

@joehealy
Copy link

joehealy commented Apr 1, 2020

Ive done it manually with code like:

degreeAxis = const AxisData
  { _axis_visibility = def
  , _axis_viewport   = linMap id (0, 360)
  , _axis_tropweiv   = invLinMap id id (0, 360)
  , _axis_ticks      = [ (i, 5) | i <- cardinals ]
                         <> [ (i + 45, 3) | i <- cardinals, i < 360 ]
  , _axis_grid       = [0, 90, 180, 270, 360]
  , _axis_labels     = [ [ (0.0, "North")
                         , (90 , "East")
                         , (180, "South")
                         , (270, "West")
                         , (360, "North")
                         ]
                       ]
  }

cardinals = [0, 90, 180, 270, 360]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants