Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.3K Views
|
1 Reply
|
3 Total Likes
View groups...
Share
Share this post:

Create the following plot Plot[(Qr/(4\[Pi])), {r, 0, 10}] ?

Posted 5 years ago

I want to plot with an unknow constant in the axis instead of numbers, but I haven't found a way yet. If I could make something like this I would be very thankful. enter image description here

Something like this?

Plot[Piecewise[{{x, x <= 1}, {1/x^2, x > 1}}], {x, 0, 4}, 
 Ticks -> {{{1, R}}, {{1, Q/(4 Pi Subscript[\[Epsilon], 0] R^2)}}}, 
 GridLines -> {{1}, {1}}, GridLinesStyle -> Dashed, 
 AxesLabel -> {r, Style["E", Italic]}, PlotStyle -> Red, 
 PlotRange -> {0, 1.2}]

or like this:

scale = 2;
pl = Plot[
  Piecewise[{{scale x, x <= 1}, {scale/x^2, x > 1}}], {x, 0, 4}, 
  Ticks -> {{{1, R}}, {{scale, 
      Q/(4 Pi Subscript[\[Epsilon], 0] R^2)}}}, 
  GridLines -> {{1}, None}, GridLinesStyle -> Dashed, 
  AxesLabel -> {r, Style["E", Italic]}, PlotStyle -> Red, 
  AspectRatio -> Automatic,
  Prolog -> {EdgeForm[Thick], Pink, Disk[{0, 4}], Black, 
    Thickness[.005], Arrow[{{0, 4}, {1, 4}}], 
    Text[Style[R, 20], {.5, 4.2}]},
  PlotRange -> {{-1, Automatic}, {0, 5.1}}]
POSTED BY: Henrik Schachner
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard