Skip to content
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

Accept label as argument in plotting #19079

Merged
merged 3 commits into from
Apr 10, 2020
Merged

Conversation

Smit-create
Copy link
Member

@Smit-create Smit-create commented Apr 6, 2020

References to other Issues or PRs

During the discussion in #19073, I found a useful feature to be added. Relevant comment #19073(comment)

Brief description of what is fixed or changed

The plot had label as an argument but it didn't accept the user passed label and was set to default as a string of the expression which looks too bad when we have a long function.

Other comments

Some of the examples where the current code in master fails are:
Example 1

Screenshot from 2020-04-06 16-30-50

Example 2
Screenshot from 2020-04-06 16-03-22

Example 3
Screenshot from 2020-04-06 16-21-36

After fixing them in this PR

Example 1
Screenshot from 2020-04-06 16-30-05

Example 2
Screenshot from 2020-04-06 16-05-57

Example 3
Screenshot from 2020-04-06 16-22-03

Release Notes

  • plotting
    • Accept user passed label of the plots

@sympy-bot
Copy link

sympy-bot commented Apr 6, 2020

Hi, I am the SymPy bot (v158). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.6.

Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it.

Click here to see the pull request description that was parsed.

<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234" (see
https://tinyurl.com/auto-closing for more information). Also, please
write a comment on that issue linking back to this pull request once it is
open. -->
During the discussion in #19073, I found a useful feature to be added. Relevant comment [#19073(comment)](https://github.com/sympy/sympy/pull/19073#discussion_r403844675)

#### Brief description of what is fixed or changed
The plot had `label` as an argument but it didn't accept the user passed `label` and was set to default as a string of the expression which looks too bad when we have a long function.

#### Other comments
Some of the examples where the current code in master fails are:
**Example 1**

![Screenshot from 2020-04-06 16-30-50](https://user-images.githubusercontent.com/55887635/78552766-b4c2a680-7825-11ea-82d4-488f4e5450e6.png)

**Example 2**
![Screenshot from 2020-04-06 16-03-22](https://user-images.githubusercontent.com/55887635/78552796-c015d200-7825-11ea-9c5a-f64a5e16fc5b.png)

**Example 3**
![Screenshot from 2020-04-06 16-21-36](https://user-images.githubusercontent.com/55887635/78552807-c73ce000-7825-11ea-97ef-3d5e0628f61f.png)

**After fixing them in this PR**

**Example 1**
![Screenshot from 2020-04-06 16-30-05](https://user-images.githubusercontent.com/55887635/78552811-c906a380-7825-11ea-9740-2f913a080717.png)

**Example 2**
![Screenshot from 2020-04-06 16-05-57](https://user-images.githubusercontent.com/55887635/78552804-c5731c80-7825-11ea-858a-735988c352d4.png)

**Example 3**
![Screenshot from 2020-04-06 16-22-03](https://user-images.githubusercontent.com/55887635/78552809-c86e0d00-7825-11ea-8f4e-1540f340ece0.png)




#### Release Notes

<!-- Write the release notes for this release below. See
https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more information
on how to write release notes. The bot will check your release notes
automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
* plotting
  * Accept user passed `label` of the plots
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@Smit-create
Copy link
Member Author

Smit-create commented Apr 6, 2020

@sylee957 Can you please look into the error at https://travis-ci.org/github/sympy/sympy/jobs/671587681?utm_medium=notification&utm_source=github_status?
Building the docs locally passes successfully as:

...
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in _build/html.
cp -r src/pics _build/html/

Build finished. The HTML pages are in _build/html.

I see a similar error here: https://travis-ci.org/github/sympy/sympy/jobs/671763962?utm_medium=notification&utm_source=github_status

@codecov
Copy link

codecov bot commented Apr 7, 2020

Codecov Report

Merging #19079 into master will increase coverage by 0.001%.
The diff coverage is 0.000%.

@@              Coverage Diff              @@
##            master    #19079       +/-   ##
=============================================
+ Coverage   75.779%   75.781%   +0.001%     
=============================================
  Files          650       650               
  Lines       168909    168909               
  Branches     39817     39817               
=============================================
+ Hits        127999    128002        +3     
+ Misses       35337     35334        -3     
  Partials      5573      5573               

@Smit-create
Copy link
Member Author

@sylee957 Does this look good to merge?

@sylee957 sylee957 merged commit 77ebac7 into sympy:master Apr 10, 2020
@Smit-create Smit-create deleted the plot_label branch May 20, 2020 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants