flekschas / jupyter-scatter

Interactive 2D scatter plot widget for Jupyter Lab and Notebook. Scales to millions of points!
https://jupyter-scatter.dev
Apache License 2.0
392 stars 17 forks source link

x tick labels #172

Open jacowp357 opened 3 days ago

jacowp357 commented 3 days ago

How can the x-tick or y-tick labels be changed?

For example, how can a bar graph be created with 3 bars, and each bar represents a month? Jan, Feb, Mar.

flekschas commented 2 days ago

Jupyter Scatter is a library for plotting datasets as 2D scatters. Bar charts or other visual plotting methods are not supported.

The x/y tick labels are data-driven. If your data is temporal, then you'd have to switch to a time scale. See https://jupyter-scatter.dev/scales#time for an example. Note that the number of ticks is determined automatically based off your data, width, and height. We're using D3's axis function for that.