Skip to content

Incorrect axis display #37

@MqCreaple

Description

@MqCreaple

I am plotting some experimental data with this package.

#let x_data = temperature.map(t => 1000 / t)
#let y_data = resistance.map(r => calc.ln(r))

// Plot the data
#let x_axis = axis(min: calc.min(..x_data) - 0.03, max: calc.max(..x_data), helper_lines: true, step: 0.05, location: "bottom", title: [$1/T$], invert_markings: false)
#let y_axis = axis(min: calc.min(..y_data) - 0.1, max: calc.max(..y_data) + 0.1, helper_lines: true, step: 0.2, location: "left", title: [$"ln"(R)$])
#let pl = plot(data: x_data.zip(y_data), axes: (x_axis, y_axis))
#scatter_plot(pl, (80%, 50%), markings: circle(radius: 2pt, fill: blue, stroke: none), caption: [Experimental values of $1/T$, measured in $10^(-3)"K"^(-1)$, with $"ln"(R)$, the natural logarithm of resistance measured in $""$.])

And the graph looks like this:

Image

There are several issues with this plot:

  1. The spacing for the axis title is incorrect. More space should be allocated for the x axis title on the bottom.
  2. The values of y axis markers are not displaying.
  3. The values of x axis markers are not displaying with the same number of digits. These values should be "1.80, 1.85, 1.90, 1.95, ..." instead of "1.8, 1.85, 1.9, 1.95, ...".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions