Opened 9 years ago

Closed 2 years ago

# plot_semilogx(1/log(x),10,10^15) should look like plot(1/x,1,15)

Reported by: Owned by: Sébastien Labbé major sage-duplicate/invalid/wontfix graphics adaptive refinement, log scale Punarbasu Purkayastha, Jason Grout Sébastien Labbé, Samuel Lelièvre N/A

### 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.

### comment:1 Changed 9 years ago by Karl-Dieter Crisman

Cc: Punarbasu Purkayastha Jason Grout added defect → enhancement

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.

### comment:2 Changed 9 years ago by Punarbasu Purkayastha

Workaround before someone introduces true logarithmic plots - create the data points yourself and use `list_plot` :)

### comment:3 Changed 9 years ago by For batch modifications

Milestone: sage-6.1 → sage-6.2

### comment:4 Changed 9 years ago by For batch modifications

Milestone: sage-6.2 → sage-6.3

### comment:5 Changed 8 years ago by For batch modifications

Milestone: sage-6.3 → sage-6.4

### comment:6 Changed 3 years ago by Samuel Lelièvre

Possibly solved by #29523.

### comment:7 Changed 3 years ago by Sébastien Labbé

Milestone: sage-6.4 → sage-duplicate/invalid/wontfix new → needs_review

I suggest to close this ticket as a duplicate of #29523.

### comment:8 Changed 3 years ago by Samuel Lelièvre

Reviewers: → Sébastien Labbé, Samuel Lelièvre needs_review → positive_review

### comment:9 Changed 2 years ago by Frédéric Chapoton

Resolution: → duplicate positive_review → closed
Note: See TracTickets for help on using tickets.