question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Drawing rectangles

See original GitHub issue

Hello,

When trying to plot (fig.plot()) rectangles, basically nothing happens…^^ Following code – with squres – works:

fig = pygmt.Figure()
fig.coast(region=[0, 26, 44, 62], projection='S13/90/6i', frame="ag", shorelines="0.3p,black", borders="1/0.5p,black")
fig.plot(10, 50, style='s1')
fig.show()

This should do the exact same thing, shouldn’t it?:

fig = pygmt.Figure()
fig.coast(region=[0, 26, 44, 62], projection='S13/90/6i', frame="ag", shorelines="0.3p,black", borders="1/0.5p,black")
fig.plot(10, 50, style='r1/1')
fig.show()

Problem: No rectangle is drawn. Alterations fomo the style command like ‘r1’, ‘r1,1’, ‘r1c’, ‘r1c/1c’ etc. neither work.

Problem 2: Substituting r by R for a rounded rectangle produces an error:

Module 'psconvert' failed with status code 78:
psconvert [ERROR]: System call [gs -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox -DPSL_no_pagefill -dMaxBitmap=2147483647 -dUseFastColor=true '/home/schroeder/.gmt/sessions/gmt6.20169/gmt_124.ps-' 2> '/home/schroeder/.gmt/sessions/gmt6.20169/psconvert_20169c.bb'] returned error 256.

I’m not sure whether this is actually a bug or just my own lack of knowledge.

Thanks in advance, Stefan

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
weiji14commented, Jun 2, 2021

Perhaps add a new gallery example to mention the style='r1/2' way of drawing rectangles? Then we can close this issue.

Could I help with this example?

Yes please, go for it! I’ll assign this issue to you @core-man.

1reaction
weiji14commented, Feb 11, 2021

Would it be possible to use a label for these types of issues (i.e., upstream problems that are solved but require an update to the minimum required GMT version)? In reading through PyGMT issues, it appears there are at least a couple of this type of issue currently open. I think a tag would help for keeping track and quickly identifying which issues do not require any action.

Yeah there are quite a few of these. I think labeling it ‘upstream’ and adding it to the v0.4.0 milestone should suffice, but feel free to suggest a new label.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to draw a rectangle given its sides - YouTube
Learn how to construct a rectangle knowing the length of its two sides.This YouTube channel is dedicated to teaching people how to improve ......
Read more >
How to Draw a Rectangle: 5 Steps (with Pictures) - wikiHow
1. Draw a straight, horizontal line using a ruler. Using a ruler will help you make sure that your line is straight, so...
Read more >
Drawing Basic Shapes - SketchUp Help
Many models start with basic shapes. In SketchUp, the shape tools help you draw rectangles, circles, and polygons. You find these tools on...
Read more >
Draw rectangular shapes with the Rectangle tool
The Rectangle tool allows you to draw rectangular shapes (vector and pixel-based) and paths (shape outlines).
Read more >
Drawing shapes with canvas - Web APIs | MDN
By the end of this article, you will have learned how to draw rectangles, triangles, lines, arcs and curves, providing familiarity with some ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found