feat: add support for enclosed plots with internal and mirrored ticks#77
feat: add support for enclosed plots with internal and mirrored ticks#77Ryan-D-Gast wants to merge 4 commits into
Conversation
|
@Psy-Fer Could I get your opinion on the above addition to the library? The change is pretty simple but I didn't give this PR my all (hence why its a draft) but I wanted to demonstrate my direction so it can be discussed before I sink a lot of time into enabling styling to project pgfplots publication quality plots. |
|
Hey, I can see the appeal for this styling, and I agree that it would make a good feature for kuva. I think how you broke it down into 3 parts, enclosed, internal, and mirrored for the border and ticks is pretty good. I'll have a think about "enclosed" though. It's probably fine but my first instinct is to explore that wording before settling on it. Internal and mirrored I think we well chosen. A few things to consider is interaction with things like rug ticks or other close to internal axis border that could overlap with the ticks and how to handle it (or allow overlapping. There is a mixture of approaches depending on plot type within kiva, something I need to do a sprint on to formalize properly) Are there other features besides these 3 that you would want? We can discuss how those would work. Moving forward, I'm happy for you to continue working on this PR, but I'm also happy to take what you have and merge it, then continue down this path for anything else. Either way I'll need to write 50 or so tests to check how it interacts with other plot types and options, internal legends, eetc.(LLM help there will speed that up a lot). One thing I'd ask you to do, is to change the target of this PR to point at the dev branch of kuva. It's currently mostly the same as main so shouldn't be any conflicts. Cheers, |
|
Thanks for the feedback. I just updated the base branch of this PR to point to I completely agree that we should get the naming right before locking it in. Since For the features in this PR:
Below summarize commit doing the above. (can be reverted if not desired in this way). said commit
From here I think you should make the changes to have its API align better with the library and do testing for said rug interactions. I will create more PRs if I have other features/fixes. PS I made it possible to do Enum or String inputs for the builder. Not sure if this is desired feel free to remove. Another option is just to making everything a bool activation instead of one builder with a enum to chose from. |
|
Nice work Yea i have thoughts on this. For example inside, outside, center. How that works isn't very clear. Like is centre just the same tick length, but centred on the axis or is it just both inside and outside. And if it is the first one, should both be an option? I think are worse options than enclosed, but that's just me. haha. I'll have a bit of a think about this, but this has helped me see more where youa re coming from, so that's helpful :) I can riff on this and i'll come back to you with what I come up with before "locking in". yea? Cheers, |
|
Ya I believe tick alignment center is half in half out. Please go ahead and riff on this. Imo "box" is the best name for fully enclosing the plot area I think it's best we follow the pgfplots terminology for this feature. |
Description
Adds support for enclosing the plot area see example below:
My goal is to support a style of plot that looks more like the plots used in scientific publications such as the library "pgfplots" which is a latex plotting library. Here is a example why I am proposing this addition should be self explanatory:
In my opinion the above plot (maybe because of my bias due to publishing using it) looks a lot more professional. This PR doesn't achieve fully enabling styling like such but I hope this sparks discussion on if additions like this are a acceptable direction for this library.
I would like a second opinion on the builder options
enclose_axes,internal_ticks, andmirror_ticksas there might be better names or way to consolidate these options into fewer settings.Consider this PR as a MVP.
Type of change
Checklist
Tests
tests/with ≥ basic render + SVG content + legend testscargo test --features cli,full— all existing tests still passVisual inspection
test_outputs/— new plot SVGs look correcttest_outputs/for layout regressionsbash scripts/smoke_tests.sh— all existing smoke test outputs still look correct