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

It is not possible to define different definition domains for multiple formulas #1

Closed
Elliootalderson opened this issue Feb 27, 2024 · 2 comments

Comments

@Elliootalderson
Copy link

No description provided.

@Elliootalderson
Copy link
Author

y = x, -5<x<5
y = x^2, 5<x<10
How to draw it?

@MarcosNicolau
Copy link
Owner

MarcosNicolau commented Feb 27, 2024

Hi @Elliootalderson,

Oh, I see what is going on there... y = x^2 is not on the view of y = x for any value of x. You need to tell Wolfram to adjust the view by setting PlotRange to Automatic or Full under the general directive. That'll be others: PlotRange -> Automatic

Here is the full code,

raster:
  dim: 2D
  background: None
  size:
    height: Automatic
    width: "250"
general:
  axes: "True"
  axesLabel: "{x, y}"
  frame: "False"
  boxed: "True"
  others: PlotRange -> Automatic
graphs:
  - id: graph_0
    options: {}
    type: plot
    plot:
      expression: x
      plotRange:
        x:
          min: "-5"
          max: "5"
  - id: graph_1
    options: {}
    type: plot
    plot:
      expression: x^2
      plotRange:
        x:
          min: "5"
          max: "10"

I thought that was the default behavior in wolfram... I'll make sure to add that option as default in the next release.

Btw, you can't add the others options from the command modal, I'll make sure to add that as well! 😁

Thx for the issue and the contribution! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants