ObjectProfile / Roassal3

The Roassal Visualization Engine
MIT License
95 stars 52 forks source link

Default size of axis titles should not be much bigger than tick lables #544

Closed olekscode closed 8 months ago

olekscode commented 1 year ago

Here is an example

example10BarPlot
    <script: 'self new example10BarPlot open'>
    | c p x y |

    x := 0.0 to: 2 count: 10.
    y := (x raisedTo: 2) - 2.
    c := RSChart new.
    p := RSBarPlot new x: x y: y.

    c addPlot: p.

    c addDecoration: (RSHorizontalTick new
        doNotUseNiceLabel;
        numberOfTicks: x size - 1;
        asFloat).
    c xlabel: 'X Axis'.
    c addDecoration: (RSVerticalTick new
        numberOfTicks: 10;
        asFloat).
    c ylabel: 'Y Axis'.
    c title: 'Histogram'.
    ^ c
image

The default axis titles (X axis and Y axis) are way too large. Compare this to the ggplot. Axis titles have same size as tick labels - but slightly different colors. And it looks great!

image image
akevalion commented 8 months ago

Update

| p x y |

    x := 0.0 to: 2 count: 10.
    y := (x raisedTo: 2) - 2.
    p := RSBarPlot new x: x y: y.

    p horizontalTick doNotUseNiceLabel;
        numberOfTicks: x size - 1;
        asFloat.
    p xlabel: 'X Axis'.
    p verticalTick numberOfTicks: 10;
        asFloat.
    p ylabel: 'Y Axis'.
    p title: 'Histogram'.
    ^ p
image