-
Notifications
You must be signed in to change notification settings - Fork 0
Add plot_A_dep_pseudo_3d #1
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
base: main
Are you sure you want to change the base?
Conversation
| ) | ||
| ax_i.fill_between( | ||
| x_i, | ||
| *pdf_set.get_uncertainties(observable=obs_i, Q=Q_i), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hier Möglichkeit einfügen, zwischen uncertainty convention "asym" und "sym" zu wählen.
| kwargs_annotation: dict[str, Any] | list[dict[str, Any] | None] = {}, | ||
| kwargs_xlabel: dict[str, Any] = {}, | ||
| kwargs_ylabel: dict[str, Any] = {}, | ||
| kwargs_legend: dict[str, Any] = {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plus variable für uncertainty convention
| ax_i.plot( | ||
| x_i, | ||
| pdf_set.get_uncertainty("+", obs_i, Q=Q_i), | ||
| **kwargs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hier dann ebenfallls uncertainty convention als Argumen übergeben
| # ... or as ylabel | ||
| elif pdf_label == "ylabel": | ||
| ax_i.set_ylabel( | ||
| f"${to_str(obs_i, Q=Q_i_label)}$", **kwargs_ylabel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hier würde ich den text des y_labels auch in kwargs_y_label default packen und dem kwargs überschreiben arbeiten, sodass der Nutzer seine y-Achse mit beliebigem Text beschriften kann
| f"${to_str(obs_i, Q=Q_i_label)}$", **kwargs_ylabel | ||
| ) | ||
|
|
||
| ax_i.set_xlabel("$x$", **kwargs_xlabel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hier würde ich den text des x_labels auch in kwargs_x_label_default packen und dem kwargs überschreiben arbeiten, sodass der Nutzer seine y-Achse mit beliebigem Text beschriften kann, das kann zb praktisch sein, wenn man nur an einem vn vielen plots überhaupt ein label möchte. Und solange es in den default_kwargs ist, wird es ja trotzdem per default genauso gesetzt
| kwargs_annotation: dict[str, Any] = {}, | ||
| kwargs_xlabel: dict[str, Any] = {}, | ||
| kwargs_ylabel: dict[str, Any] = {}, | ||
| kwargs_legend: dict[str, Any] = {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncertainty convention hinzufügen
| ) | ||
| ax_i.fill_between( | ||
| x_i, | ||
| *pdf_set.get_uncertainties(observable=obs_i, Q=Q_i), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncertainty convention hinzufügen
| ) | ||
| ax_i.plot( | ||
| x_i, | ||
| pdf_set.get_uncertainty("+", obs_i, Q=Q_i), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncertainty convention
| ) | ||
| ax_i.plot( | ||
| x_i, | ||
| pdf_set.get_uncertainty("-", obs_i, Q=Q_i), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncertainty convention
| kwargs_annotation, | ||
| ) | ||
| ax_i.annotate( | ||
| f"${to_str(obs_i, Q=Q_i_label)}$", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text der annotation in default kwargs
| ) | ||
|
|
||
| else: | ||
| ax_i.set_xlabel("$x$", **kwargs_xlabel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text des x-labels in default kwargs s.o.
|
|
||
| # add the ylabel | ||
| if pdf_label == "ylabel": | ||
| ax_i.set_ylabel( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text ylabel in default kwargs s.o.
| np.max( | ||
| [ | ||
| self.get(A=A_i).get_uncertainty("+", obs_i, x=x, Q=Q, Q2=Q2) | ||
| for A_i in A |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add uncertainty convention
| ) | ||
| l = ax_i.plot( | ||
| x_i, | ||
| pdf_set.get_central(obs_i, Q=Q_i), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich versteh nicht ganz wie hier (und überall sonst wo geplottet wird) das mit Q_i als array läuft. Ich denke das muss ein float sein an dieser Stelle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Habs getestet und in der Tat funktioniert es nur, wenn Q ein float ist
Add a function to plot the A-dependence of a
NuclearPDFSetin a pseudo-3D plot, i.e. using insets.