<jupyter_start><jupyter_text>Category Plots, aka Bar Charts<jupyter_code>from beakerx import *
bars = CategoryBars(value = [[1, 2, 3], [1, 3, 5]])
CategoryPlot().add(bars)<jupyter_output><empty_output><jupyter_text>the initWidth and initHeight properties<jupyter_code>cplot = CategoryPlot(initWidth = 400, initHeight = 200)
bars = CategoryBars(value = [[1, 2, 3], [1, 3, 5]])
cplot.add(bars)<jupyter_output><empty_output><jupyter_text>the title, x and y axis labels<jupyter_code>cplot = CategoryPlot(title = "Hello CategoryPlot!",
                             xLabel = "Categories",
                             yLabel = "Values")
cplot.add(CategoryBars(value = [[1, 2, 3], [1, 3, 5]]))<jupyter_output><empty_output><jupyter_text>the category labels<jupyter_code>cplot = CategoryPlot(categoryNames =  ["Helium", "Neon", "Argon"])
cplot.add(CategoryBars(value = [[1, 2, 3], [1, 3, 5]]))<jupyter_output><empty_output><jupyter_text>the series labels<jupyter_code>bars = CategoryBars(value = [[1, 2], [3, 4], [5, 6], [7, 8]],
                            seriesNames = ["Gas", None, "", "Liquid"])
CategoryPlot().add(bars)<jupyter_output><empty_output><jupyter_text>the legend<jupyter_code>plot = CategoryPlot(showLegend = True) 
# since no display names were provided, default names "series0" etc will be used.
plot.add(CategoryBars(value = [[1, 2, 3], [1, 3, 5]]))<jupyter_output><empty_output><jupyter_text>the orientation<jupyter_code>plot = CategoryPlot(orientation = PlotOrientationType.HORIZONTAL)
plot.add(CategoryBars(value = [[1, 2, 3], [1, 3, 5]]))<jupyter_output><empty_output><jupyter_text>the label angle<jupyter_code>plot = CategoryPlot(categoryNames = ["Acid", "Neutral", "Base"], 
                            categoryNamesLabelAngle = -1/4 * math.pi)
plot.add(CategoryBars(value = [[1, 2, 3], [4, 5, 6]]))<jupyter_output><empty_output><jupyter_text>the margin<jupyter_code>plot = CategoryPlot(categoryMargin = 2)
plot.add(CategoryBars(value = [[1, 2, 3], [4, 5, 6]]))<jupyter_output><empty_output><jupyter_text>the color (single value)<jupyter_code>bars = CategoryBars(value = [[1, 2], [3, 4], [5, 6]], 
                            color = Color.pink)
CategoryPlot().add(bars)<jupyter_output><empty_output><jupyter_text>the color (list of values)<jupyter_code>colors = [Color.pink, [Color.red, Color.gray, Color.blue]]
bars = CategoryBars(value = [[1, 2, 3], [4, 5, 6]], 
                            color = colors)
CategoryPlot().add(bars)<jupyter_output><empty_output><jupyter_text>the base (single value)<jupyter_code>bars = CategoryBars(value = [[1, 2, 3], [4, 5, 6]], 
                            base = -2)
CategoryPlot().add(bars)<jupyter_output><empty_output><jupyter_text>the base (list of values)<jupyter_code>bars = CategoryBars(value = [[1, 2, 3], [4, 5, 5]],
                            base = [-2, [-4, -4, -1]])
CategoryPlot().add(bars)<jupyter_output><empty_output><jupyter_text>the width (single value)<jupyter_code>bars = CategoryBars(value = [[1, 2, 3], [4, 5, 6]],
                            width = 0.3)
CategoryPlot().add(bars)<jupyter_output><empty_output><jupyter_text>the width (list of values)<jupyter_code>bars = CategoryBars(value = [[1, 2, 3], [4, 5, 6]],
                            width = [[0.3, 0.6, 1.7], 1.0])
CategoryPlot().add(bars)<jupyter_output><empty_output><jupyter_text>the fill (single value)<jupyter_code>bars = CategoryBars(value = [[1, 2, 3], [4, 5, 6]],
                            fill = [False, False])
CategoryPlot().add(bars)<jupyter_output><empty_output><jupyter_text>the fill (list of values)<jupyter_code>bars = CategoryBars(value = [[1, 2, 3], [4, 5, 6]],
                            fill = [[False, True, False], True])
CategoryPlot().add(bars)<jupyter_output><empty_output><jupyter_text>draw outline (single value)<jupyter_code>bars = CategoryBars(value = [[1, 2, 3], [4, 5, 6]],
                            drawOutline = True)
CategoryPlot().add(bars)<jupyter_output><empty_output><jupyter_text>draw outline (list of values)<jupyter_code>bars = CategoryBars(value = [[1, 2, 3], [4, 5, 6]],
                    drawOutline = [[False, True, False], True])
CategoryPlot().add(bars)<jupyter_output><empty_output><jupyter_text>outline color (single value)<jupyter_code>bars = CategoryBars(value = [[1, 2, 3], [4, 5, 6]],
                    drawOutline = True,
                    outlineColor = Color.green)
CategoryPlot().add(bars)<jupyter_output><empty_output><jupyter_text>outline color (list of values)<jupyter_code>bars = CategoryBars(value = [[1, 2, 3], [4, 5, 6]],
                    drawOutline = True,
                    outlineColor = [Color.green, Color.red])
CategoryPlot().add(bars)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16592119275825346, 'fraction_numerical': 0.03258785942492013, 'mean_word_length': 4.126637554585153, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '21', 'dir': 'jupyter-structured-clean-dedup', 'id': '393817', 'license': 'Apache-2.0', 'n_tokens_mistral': 1812, 'n_tokens_neox': 1657, 'n_words': 326, 'path': 'test/ipynb/python/CategoryPlotTest.ipynb', 'repo_name': 'ssadedin/beakerx', 'size': '4695'}