Discussion about aliases for multi-axis log/power projections

Open
#664 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
julia

Research direction

Start with GMT.jl's basemap entry point and the existing projection bindings, especially how the figsize strings currently apply log scaling. Resolve whether the API should use separate axis projections or a logxy-style alias, then verify that the chosen design supports the multi-axis logarithmic projection shown in the issue.

Written by the indexing model from the issue text.

Description

When trying to copy the second GMT tutorial into GMT.jl I have encountered a missing symbol (I think). The GMT command I want to reproduce is:

gmt begin GMT_tut_2
	gmt basemap -R1/10000/1e20/1e25 -JX9il/6il -Bxa2+l"Wavelength (m)" -Bya1pf3+l"Power (W)" -BWS
gmt end show

Both the x and y axis are in a log scale. At the moment, this can be achieved by specifying the l flag to the figsize strings:

function tutorial2()
    basemap(
        region = (1, 10000, 1e20, 1e25),
        figsize = ("9il", "6il"),
        frame = (
            axes = (:left_full, :bottom_full),
            xlabel = "Wavelength (m)",
            ylabel = "Power (W)",
        ),
        xaxis = (annot = 2, ticks = :auto),
        yaxis = (annot = "1p", ticks = 3),
        show = true,
        Vd = 1,
    )
end

However, it would be nice to separate projection and size. Maybe there could be distinct xproj and yproj arguments (larger change, would require rework of existing projection bindings) or just a :logxy projection. Let me know which one of these you prefer, and I will look into an implementation (unless you already have something planned).

EDIT: To stay consistent with the map projection syntax, maybe it would be better to use something like proj = (name = :log, apply = "xy").

Dominant language
Julia
Stars
222
Forks
35
Avg merge
8h 1m
Merged PRs (30d)
9

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GenericMappingTools/GMT.jl

All issues in GenericMappingTools/GMT.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.