Hi
I’m trying to create a categorical scatter plot with jitter, but getting a blank browser page, no plot, no error messages.
I started with a numeric x-axis and jitter, which worked fine. Then I changed the code to give me a categorical plot and this works fine without jitter. When I add jitter I get a blank browser page, athough no errors thrown. Sure I’m doing something stupid, but would very much appreciate help to find out what!
Copy of code below, with simplified test data.
import bokeh
from bokeh.models import (ColorBar, ColumnDataSource, Legend, PanTool, Plot, SaveTool, BoxZoomTool,
Label, LabelSet, Range1d)
from bokeh.plotting import figure, output_file, show
from bokeh.transform import linear_cmap, jitter
from bokeh.core.enums import LegendLocation
from bokeh.io import export_png
from bokeh.layouts import column, row,gridplot
#simplified test data
pmaxtoplot=[0.5,0.6,0.4,0.7]
pmaxtemplabs=["23C","23C","24C","24C"]
xaxiscats=["23C","24C"]
#####
pmaxplotsource=ColumnDataSource(data=dict(pmax=pmaxtoplot,templab=pmaxtemplabs))
pmplot1 = figure(title = "categorical plot",x_range=xaxiscats, y_range=(0.0,1.04), plot_width=1000, plot_height=600)
pmplot1.circle(x=jitter("templab",width=0.2), y="pmax", size=4,source=pmaxplotsource)
#the commented plot.circle command below, without jitter, works
#pmplot1.circle(x="templab", y="pmax", size=4,source=pmaxplotsource)
show (pmplot1)