-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy pygmt.Figure()
instance or object to a new variable and keep the initial variable as is
#3645
Comments
This feature is difficult to implement. The main reason is that, GMT stores the half-baked PS file, gmt.history, gmt.conf and even inset/subplot settings in temporary files. To implement what you expect with the syntax like |
Yes, modern mode is quite tricky and does not lets us almost no liberty to inovate. However, I am a bit confused with this behavior, but for another reason. When you call |
We're doing this in PyGMT:
When calling |
But if you call
What am I missing? |
Maybe you're not in modern mode? Try this one:
|
Hmm, I see. I guess I had forgotten or didn't even know that we could do that in modern mode. I barely use it, except for the insets in Julia where fish inside some of the tmp files to learn the coordinates where to put the inset. It's a crazy mixed scheme between modern and classic. |
Ah, so it was a forgotten thing since psconvert.c is one of the codes that I visit more often. And speaking of which, it would be nice if you could use the |
OK. Will give it a try. |
Copying a
pygmt.Figure()
instance or object to a new variable can be useful, e.g., within a Jupyter notebook for re-running cells with different arguments passed to the parameters to test different visualizations. However, this seems to be not straight forward. In the example below, I would like to achieve thatfig1
remains as is after adding features tofig2
. Neither runningfig2 = fig1
nor runningfig2 = copy.deepcopy(fig1)
before changingfig2
works as expected. Maybe there is a relationship to continuing the GMT session and not creating a new one?Related to: GenericMappingTools/agu24workshop#8 (comment), GenericMappingTools/agu24workshop#8 (comment)
The text was updated successfully, but these errors were encountered: