### Question:
SubCategoryAxis extends CategoryAxis implements Cloneable, Serializable { @Override public AxisState draw(Graphics2D g2, double cursor, Rectangle2D plotArea, Rectangle2D dataArea, RectangleEdge edge, PlotRenderingInfo plotState) { if (!isVisible()) { return new AxisState(cursor); } if (isAxisLineVisible()) { drawAxisLine(g2, cursor, dataArea, edge); } AxisState state = new AxisState(cursor); state = drawSubCategoryLabels(g2, plotArea, dataArea, edge, state, plotState); state = drawCategoryLabels(g2, plotArea, dataArea, edge, state, plotState); state = drawLabel(getLabel(), g2, plotArea, dataArea, edge, state); return state; } SubCategoryAxis(String label); void addSubCategory(Comparable subCategory); Font getSubLabelFont(); void setSubLabelFont(Font font); Paint getSubLabelPaint(); void setSubLabelPaint(Paint paint); @Override AxisSpace reserveSpace(Graphics2D g2, Plot plot,
                                  Rectangle2D plotArea,
                                  RectangleEdge edge, AxisSpace space); @Override AxisState draw(Graphics2D g2,
                          double cursor,
                          Rectangle2D plotArea,
                          Rectangle2D dataArea,
                          RectangleEdge edge,
                          PlotRenderingInfo plotState); @Override boolean equals(Object obj);  }### Answer:
@Test public void test2275695() { JFreeChart chart = ChartFactory.createStackedBarChart("Test", "Category", "Value", null); CategoryPlot plot = (CategoryPlot) chart.getPlot(); plot.setDomainAxis(new SubCategoryAxis("SubCategoryAxis")); BufferedImage image = new BufferedImage(200 , 100, BufferedImage.TYPE_INT_RGB); Graphics2D g2 = image.createGraphics(); chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null, null); g2.dispose(); }