Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
Vorlesungsskript-Physik-II-UniHH-
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Horns, Prof. Dr. Dieter
Vorlesungsskript-Physik-II-UniHH-
Commits
00878274
Commit
00878274
authored
3 weeks ago
by
Horns, Prof. Dr. Dieter
Browse files
Options
Downloads
Patches
Plain Diff
added python script for figure in section 9
(massstab)
parent
81ab6b1e
No related branches found
No related tags found
No related merge requests found
Pipeline
#74756
passed
3 weeks ago
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
v0.1/figures/massstab.png
+0
-0
0 additions, 0 deletions
v0.1/figures/massstab.png
v0.1/figures/masstab.py
+39
-0
39 additions, 0 deletions
v0.1/figures/masstab.py
with
39 additions
and
0 deletions
v0.1/figures/massstab.png
0 → 100644
+
0
−
0
View file @
00878274
38.5 KiB
This diff is collapsed.
Click to expand it.
v0.1/figures/masstab.py
0 → 100644
+
39
−
0
View file @
00878274
from
matplotlib
import
pyplot
as
plt
import
numpy
as
np
#plt.xkcd()
fig
=
plt
.
figure
()
plt
.
rc
(
'
text
'
,
usetex
=
True
)
ax
=
fig
.
add_subplot
(
1
,
1
,
1
)
#plt.rc('font',family='serif')
#ax.spines['right'].set_color('none')
#ax.spines['top'].set_color('none')
#plt.yticks([])
ax
.
set_ylim
([
-
5
,
5.
])
ax
.
set_xlim
([
0
,
5.
])
ax
.
set_xlabel
(
r
'
g/f
'
)
ax
.
set_ylabel
(
r
'
m
'
)
x0
=
np
.
linspace
(
0
,
1.
,
3
)
yt
=
np
.
ones
(
x0
.
size
)
*
5.
yb
=
np
.
zeros
(
x0
.
size
)
x
=
np
.
linspace
(
0
,
0.999
,
500
)
#plt.annotate(
# 'THE DAY I REALIZED\nI COULD COOK BACON\nWHENEVER I WANTED',
# xy=(70, 1), arrowprops=dict(arrowstyle='->'), xytext=(15, -10))
#plt.title(" im LC-Kreis: Einschaltvorgang")
y
=
1.
/
(
1
-
x
)
plt
.
plot
(
x
,
y
,
'
b
'
)
x
=
np
.
linspace
(
1.001
,
5
,
500
)
y
=
1.
/
(
1
-
x
)
plt
.
plot
(
x
,
y
,
'
b
'
)
plt
.
hlines
(
0
,
0
,
5
,
'
b
'
)
plt
.
hlines
(
1
,
0
,
5
,
'
b
'
,
'
-.
'
)
plt
.
hlines
(
-
1
,
0
,
5
,
'
b
'
,
'
-.
'
)
plt
.
vlines
(
1
,
-
5
,
5
,
'
b
'
,
'
--
'
)
plt
.
savefig
(
'
massstab.png
'
,
dpi
=
300
,
bbox_inches
=
'
tight
'
)
#plt.savefig('massstab.png',bbox_inches='tight')
plt
.
show
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment