Opened 7 years ago
Last modified 3 weeks ago
#15320 positive_review enhancement
plot_semilogx(1/log(x),10,10^15) should look like plot(1/x,1,15)
Reported by: | slabbe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | graphics | Keywords: | adaptive refinement, log scale |
Cc: | ppurka, jason | Merged in: | |
Authors: | Reviewers: | Sébastien Labbé, Samuel Lelièvre | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
The adaptive refinement plotting code is not well adapted for a logarithmic scale on the x axis.
In the following example, where the x ranges from 10
to 10^15
no values are computed between 10
and 10^12
which is a big part of the plot when drawn on a logarithmic scale. The plot is linear from x=10
to x=10^12
which is quite weird; it should look like the inverse of x : plot(1/x,1,15)
.
plot_semilogx(1/log(x),10,10^15)
By changing the left most point of the interval, we confirm the problem:
sage: p = plot(1/log(x),10,10^15,scale='semilogx',color='blue',thickness=3) sage: q = plot(1/log(x),100,10^15,scale='semilogx',color='red', thickness=3) sage: r = plot(1/log(x),1000,10^15,scale='semilogx',color='green',thickness=3) sage: p+q+r
Also, the semilogx plots looks thinner than usual. I don't know why. This is why I increase the thickness.
Change History (8)
comment:1 Changed 7 years ago by
- Cc ppurka jason added
- Type changed from defect to enhancement
comment:2 Changed 7 years ago by
Workaround before someone introduces true logarithmic plots - create the data points yourself and use list_plot
:)
comment:3 Changed 6 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:4 Changed 6 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:5 Changed 6 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:6 Changed 6 weeks ago by
Possibly solved by #29523.
comment:7 Changed 3 weeks ago by
- Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
I suggest to close this ticket as a duplicate of #29523.
comment:8 Changed 3 weeks ago by
- Reviewers set to Sébastien Labbé, Samuel Lelièvre
- Status changed from needs_review to positive_review
That's an interesting question. Currently the (semi)log plots are just regular plots with a different scale, which is done in the
show
method - see here, for instance.That doesn't mean we couldn't make this happen, but it would be nontrivial. I feel like this is more of an enhancement request, maybe? But I'm not wedded to it.