GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update the gallery example for plotting lines with LineString/MultiLineString geometry by michaelgrund · Pull Request #3711 · GenericMappingTools/pygmt

Conversation

@michaelgrund

@michaelgrund michaelgrund commented Dec 24, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Description of proposed changes

Fixes #3320

Preview: https://pygmt-dev--3711.org.readthedocs.build/en/3711/gallery/lines/linestrings.html#

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.
  • Use underscores (not hyphens) in names of Python files and directories.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash command is:

  • /format: automatically format and lint the code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@michaelgrund
Update gpd lines gallery example
3696994
@michaelgrund michaelgrund added the documentation Improvements or additions to documentation label Dec 24, 2024
@michaelgrund michaelgrund added this to the 0.14.0 milestone Dec 24, 2024
@michaelgrund
michaelgrund marked this pull request as draft December 24, 2024 14:46
@michaelgrund
update
c6bfba4
@seisman

seisman commented Dec 25, 2024

Copy link
Copy Markdown
Member

Two thoughts:

  1. Perhaps we should have geodatasets installed in our CI, so that we don't have to have the long URL hardcoded.
  2. The title "Rivers" gives me the expression that this is about a river dataset, but actually it's all about plotting LineString/MultiLineString geometries in GeoPandas objects (or geojson format). Maybe rename the title to something like "Plotting lines with LineString/MultiLineString geometry", "GeoPandas: Lines with LineString/MultiLineString geometry"
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@michaelgrund

michaelgrund commented Dec 25, 2024

Copy link
Copy Markdown
Member Author

Two thoughts:

1. Perhaps we should have [`geodatasets`](https://github.com/geopandas/geodatasets) installed in our CI, so that we don't have to have the long URL hardcoded.

2. The title "Rivers" gives me the expression that this is about a river dataset, but actually it's all about plotting LineString/MultiLineString geometries in GeoPandas objects (or geojson format). Maybe rename the title to something like "Plotting lines with LineString/MultiLineString geometry", "GeoPandas: Lines with LineString/MultiLineString geometry"

Agree with both points. Regarding point 1 we just want to add it for the docs/gallery example and not as an general dependency, right?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@seisman

seisman commented Dec 25, 2024

Copy link
Copy Markdown
Member

Two thoughts:

1. Perhaps we should have [`geodatasets`](https://github.com/geopandas/geodatasets) installed in our CI, so that we don't have to have the long URL hardcoded.

2. The title "Rivers" gives me the expression that this is about a river dataset, but actually it's all about plotting LineString/MultiLineString geometries in GeoPandas objects (or geojson format). Maybe rename the title to something like "Plotting lines with LineString/MultiLineString geometry", "GeoPandas: Lines with LineString/MultiLineString geometry"

Agree with both points. Regarding point 1 we just want to add it for the docs/gallery example and not as an general dependency, right?

Yes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@yvonnefroehlich

yvonnefroehlich commented Dec 25, 2024

Copy link
Copy Markdown
Member

Regarding point 1, this would be also relevant / helpful for the Gallery example Choropleth map.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@seisman

seisman commented Dec 25, 2024

Copy link
Copy Markdown
Member

Regarding point 1, this would be also relevant / helpful for the Gallery example Choropleth map.

Maybe we should add geodatasets and update the Choropleth example in a separate PR first.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@michaelgrund
update name
8c5bfa8
@seisman

seisman commented Dec 25, 2024

Copy link
Copy Markdown
Member

Regarding point 1, this would be also relevant / helpful for the Gallery example Choropleth map.

Maybe we should add geodatasets and update the Choropleth example in a separate PR first.

I'll open a PR in minites.

michaelgrund reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@seisman seisman mentioned this pull request Dec 25, 2024
Add 'geodatasets' as a dependency for docs and update the choropleth example #3719
Merged
@michaelgrund
michaelgrund marked this pull request as ready for review December 25, 2024 14:03
@michaelgrund
Merge branch 'main' into upd-gpd-lines-gallery
db9915b
seisman
seisman reviewed Dec 25, 2024
View reviewed changes
Comment thread examples/gallery/lines/linestrings.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread examples/gallery/lines/linestrings.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

yvonnefroehlich
yvonnefroehlich reviewed Dec 25, 2024
View reviewed changes
Comment thread examples/gallery/lines/linestrings.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

michaelgrund and others added 7 commits December 26, 2024 12:17
@michaelgrund @seisman
Apply suggestions from code review
d222759
Co-authored-by: Dongdong Tian <[email protected]>
@michaelgrund @seisman
Apply suggestions from code review
47dabbc
Co-authored-by: Dongdong Tian <[email protected]>
@michaelgrund
remove empty rows
1dbebb5
@michaelgrund
Merge branch 'main' into upd-gpd-lines-gallery
45c04fa
@michaelgrund
update
17284c2
@michaelgrund
update
e4442a3
@michaelgrund
Merge branch 'main' into upd-gpd-lines-gallery
23ba61a
@michaelgrund

michaelgrund commented Dec 26, 2024

Copy link
Copy Markdown
Member Author

/format

github-actions[bot] reacted with rocket emoji github-actions[bot] reacted with eyes emoji
All reactions
  • 🚀 1 reaction
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

actions-bot and others added 4 commits December 26, 2024 11:33
@actions-bot
[format-command] fixes
97aaa81
@michaelgrund
add data via geodatasets
736e519
@michaelgrund
Merge branch 'main' into upd-gpd-lines-gallery
3d9703a
@michaelgrund
Merge branch 'main' into upd-gpd-lines-gallery
b4fa12c
yvonnefroehlich
yvonnefroehlich reviewed Dec 26, 2024
View reviewed changes
Comment thread examples/gallery/lines/linestrings.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread examples/gallery/lines/linestrings.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

michaelgrund and others added 3 commits December 26, 2024 17:57
@michaelgrund
Merge branch 'main' into upd-gpd-lines-gallery
76ed9de
@michaelgrund @yvonnefroehlich
Apply suggestions from code review
b3e0e27
Co-authored-by: Yvonne Fröhlich <[email protected]>
@michaelgrund
fix typo
2231241
seisman
seisman reviewed Dec 27, 2024
View reviewed changes
Comment thread examples/gallery/lines/linestrings.py Outdated
@@ -0,0 +1,39 @@
"""
Plotting lines with LineString/MultiLineString geometry

@seisman seisman Dec 27, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if it makes more sense to change the title to:

GeoPandas: Plotting lines with LineString/MultiLineString geometry

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread examples/gallery/lines/linestrings.py Outdated

The :meth:`pygmt.Figure.plot` method allows us to plot geographical data such
as lines which are stored in a :class:`geopandas.GeoDataFrame` object. Use
:func:`geopandas.read_file` to load data from any supported OGR format such as

@seisman seisman Dec 27, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:func:`geopandas.read_file` to load data from any supported OGR format such as
:func:`geopandas.read_file` to load data from any supported OGR formats such as

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@michaelgrund michaelgrund Dec 30, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think format is correct here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread examples/gallery/lines/linestrings.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread examples/gallery/lines/linestrings.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@seisman seisman mentioned this pull request Dec 27, 2024
Release PyGMT v0.14.0 #3691
Closed
37 of 49 tasks
yvonnefroehlich
yvonnefroehlich reviewed Dec 29, 2024
View reviewed changes
Comment thread examples/gallery/lines/linestrings.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

michaelgrund and others added 5 commits December 30, 2024 18:23
@michaelgrund
Update linestrings.py
d2dc007
@michaelgrund @seisman
Apply suggestions from code review
8087c1c
Co-authored-by: Dongdong Tian <[email protected]>
@michaelgrund
Wrap line to 88 chars
72d2cc1
@michaelgrund
Merge branch 'main' into upd-gpd-lines-gallery
b7fab6d
@michaelgrund
rm trailing ws
573309c
yvonnefroehlich
yvonnefroehlich reviewed Dec 30, 2024
View reviewed changes
Comment thread examples/gallery/lines/linestrings.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread examples/gallery/lines/linestrings.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

seisman
seisman reviewed Dec 31, 2024
View reviewed changes
Comment thread examples/gallery/lines/linestrings.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

seisman
seisman reviewed Dec 31, 2024
View reviewed changes
Comment thread examples/gallery/lines/linestrings.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread examples/gallery/lines/linestrings.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@seisman seisman changed the title Update gpd lines gallery example Update the gallery example for plotting lines with LineString/MultiLineString geometry Dec 31, 2024
seisman and others added 2 commits December 31, 2024 23:42
@seisman @yvonnefroehlich
Apply suggestions from code review
ac4b31d
Co-authored-by: Yvonne Fröhlich <[email protected]>
@seisman
Merge branch 'main' into upd-gpd-lines-gallery
49e9816
@seisman

seisman commented Dec 31, 2024

Copy link
Copy Markdown
Member

I've committed the suggestion @yvonnefroehlich and I made, so that this PR can be merged in v0.14.0.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

seisman added a commit that referenced this pull request Dec 31, 2024
@seisman
Add an entry for PR #3711
624a90f
@seisman
seisman merged commit 32cc7a2 into main Dec 31, 2024
@seisman
seisman deleted the upd-gpd-lines-gallery branch December 31, 2024 15:57
@yvonnefroehlich yvonnefroehlich mentioned this pull request Jan 7, 2025
ruff: Ignore the B018 rule (useless expressions) in examples #3750
Merged
@yvonnefroehlich yvonnefroehlich mentioned this pull request Nov 27, 2025
Example for geopandas line geometry: Use Natural Earth dataset, change to Asia #4229
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@seisman seisman seisman left review comments
@yvonnefroehlich yvonnefroehlich yvonnefroehlich left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

documentation Improvements or additions to documentation

Projects

None yet

Milestone

0.14.0

Development

Successfully merging this pull request may close these issues.

Use a different dataset in the gallery example "examples/gallery/lines/roads.py"

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@michaelgrund @seisman @yvonnefroehlich @actions-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.